Search Results

Search found 4135 results on 166 pages for 'img'.

Page 15/166 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • How to create Jquery products slider?

    - by Kelvin
    Hi all, I am trying to create jquery slider that could slide DIV's. I need something like jCarousel or jquery Moving Boxes. It should be simple sliding of 3 items at a time. <div class="all-items"> <div class="item"><img src="">Item text 1</div> <div class="item"><img src="">Item text 2</div> <div class="item"><img src="">Item text 3</div> <div class="item"><img src="">Item text 4</div> <div class="item"><img src="">Item text 5</div> <div class="item"><img src="">Item text 6</div> </div> Any suggestions what should I use? Thanks in advance

    Read the article

  • div in an iframe

    - by Hulk
    In an iframe how to make a div to hide and on mouse over the bottom of the page bring it to front again. This is just like a control that appears in medial players,hide when mouse out and show when mouse over <div> <img src="play.gif"/> <img src="next.gif"/> <img src="last.gif"/> <img src="first.gif"/> <img src="previous.gif"/> <img src="next.gif"/> </div> Thanks..

    Read the article

  • Different function returns from command line and within function

    - by Myx
    Hello: I have an extremely bizzare situation: I have a function in MATLAB which calls three other main functions and produces two figures for me. The function reads in an input jpeg image, crops it, segments it using kmeans clustering, and outputs 2 figures to the screen - the original image and the clustered image with the cluster centers indicated. Here is the function in MATLAB: function [textured_avg_x photo_avg_x] = process_database_images() clear all warning off %#ok type_num_max = 3; % type is 1='texture', 2='graph', or 3='photo' type_num_max = 1; img_max_num_photo = 100; % 400 photo images img_max_num_other = 100; % 100 textured, and graph images for type_num = 1:2:type_num_max if(type_num == 3) img_num_max = img_max_num_photo; else img_num_max = img_max_num_other; end img_num_max = 1; for img_num = 1:img_num_max [type img] = load_image(type_num, img_num); %img = imread('..\images\445.jpg'); img = crop_image(img); [IDX k block_bounds features] = segment_image(img); end end end The function segment_image first shows me the color image that was passed in, performs kmeans clustering, and outputs the clustered image. When I run this function on a particular image, I get 3 clusters (which is not what I expect to get). When I run the following commands from the MATLAB command prompt: >> img = imread('..\images\texture\1.jpg'); >> img = crop_image(img); >> segment_image(img); then the first image that is displayed by segment_image is the same as when I run the function (so I know that the clustering is done on the same image) but the number of clusters is 16 (which is what I expect). In fact, when I run my process_database_images() function on my entire image database, EVERY image is evaluated to have 3 clusters (this is a problem), whereas when I test some images individually, I get in the range of 12-16 clusters, which is what I prefer and expect. Why is there such a discrepancy? Am I having some syntax bug in my process_database_images() function? If more code is required from me (i.e. segment_images function, or crop_image function), please let me know. Thanks.

    Read the article

  • MATLAB: different function returns from command line and within function

    - by Myx
    Hello: I have an extremely bizzare situation: I have a function in MATLAB which calls three other main functions and produces two figures for me. The function reads in an input jpeg image, crops it, segments it using kmeans clustering, and outputs 2 figures to the screen - the original image and the clustered image with the cluster centers indicated. Here is the function in MATLAB: function [textured_avg_x photo_avg_x] = process_database_images() clear all warning off %#ok type_num_max = 3; % type is 1='texture', 2='graph', or 3='photo' type_num_max = 1; img_max_num_photo = 100; % 400 photo images img_max_num_other = 100; % 100 textured, and graph images for type_num = 1:2:type_num_max if(type_num == 3) img_num_max = img_max_num_photo; else img_num_max = img_max_num_other; end img_num_max = 1; for img_num = 1:img_num_max [type img] = load_image(type_num, img_num); %img = imread('..\images\445.jpg'); img = crop_image(img); [IDX k block_bounds features] = segment_image(img); end end end The function segment_image first shows me the color image that was passed in, performs kmeans clustering, and outputs the clustered image. When I run this function on a particular image, I get 3 clusters (which is not what I expect to get). When I run the following commands from the MATLAB command prompt: >> img = imread('..\images\texture\1.jpg'); >> img = crop_image(img); >> segment_image(img); then the first image that is displayed by segment_image is the same as when I run the function (so I know that the clustering is done on the same image) but the number of clusters is 16 (which is what I expect). In fact, when I run my process_database_images() function on my entire image database, EVERY image is evaluated to have 3 clusters (this is a problem), whereas when I test some images individually, I get in the range of 12-16 clusters, which is what I prefer and expect. Why is there such a discrepancy? Am I having some syntax bug in my process_database_images() function? If more code is required from me (i.e. segment_images function, or crop_image function), please let me know. Thanks.

    Read the article

  • Adding a link to image breaks jquery slider, help please!

    - by lewisqic
    Hi All, I am working on a site for a friend and trying to add a link to each image in a slide show. The slide show uses jquery and a script called easySlider1.7.js. Everything works just fine if the images are left alone, but when I try and wrap the images with a link, the slides no longer progress as they should. Here is the live website that is displaying the problem... http://www.splits59.com/ Here is the html code for each of the slide images... <div class="covercontent2box"> <div class="covercontent2"> <div id="slideshow"> <a href="/ashton-jacket-p-107.html"><img src="img/homepagesummer2010_2.2-cut.jpg" class="active" /></a> <a href="/carly-coverup-p-106.html"><img src="img/homepagesummer2010_3.2-cut.jpg" /></a> <a href="/shop-online-bottoms-c-15_14.html"><img src="img/homepagesummer2010_1.2-cut.jpg" /></a> </div> </div> </div> And here is the jquery code on the page that controls the slider... <script type="text/javascript"> function slideSwitch() { var $active = $('#slideshow IMG.active'); if ( $active.length == 0 ) $active = $('#slideshow IMG:last'); // use this to pull the images in the order they appear in the markup var $next = $active.next().length ? $active.next() : $('#slideshow IMG:first'); $active.addClass('last-active'); $next.css({opacity: 0.0}) .addClass('active') .animate({opacity: 1.0}, 1000, function() { $active.removeClass('active last-active'); }); } $(function() { setInterval( "slideSwitch()", 4500 ); }); </script> Does anyone have any idea why adding a link tag to the images breaks the slider? Any help or direction provided would be appreciated. Thanks, Devin

    Read the article

  • Getting the first image elements id within an unordered list using JQuery

    - by Roland
    I'm trying to get the id of the first element of an unordered list using JQuery. Here's the list <ul class="list"> <li><img id="1" src="image1.jpg" name="image1" /></li> <li><img id="2" src="image2.jpg" name="image2" /></li> <li><img id="3" src="image3.jpg" name="image3" /></li> <li><img id="4" src="image4.jpg" name="image4" /></li> <li><img id="5" src="image5.jpg" name="image5" /></li> </ul> JQuery var id = $('.list li img'):first.attr('id');

    Read the article

  • ASp.Net Mvc 1.0 Dynamic Images Returned from Controller taking 154 seconds+ to display in IE8, firef

    - by julian guppy
    I have a curious problem with IE, IIS 6.0 dynamic PNG files and I am baffled as to how to fix.. Snippet from Helper (this returns the URL to the view for requesting the images from my Controller. string url = LinkBuilder.BuildUrlFromExpression(helper.ViewContext.RequestContext, helper.RouteCollection, c = c.FixHeight(ir.Filename, ir.AltText, "FFFFFF")); url = url.Replace("&", "&"); sb.Append(string.Format("<removed id=\"TheImage\" src=\"{0}\" alt=\"\" /", url)+Environment.NewLine); This produces a piece of html as follows:- img id="TheImage" src="/ImgText/FixHeight?sFile=Images%2FUser%2FJulianGuppy%2FMediums%2Fconservatory.jpg&backgroundColour=FFFFFF" alt="" / brackets missing because i cant post an image... even though I dont want to post an image I jsut want to post the markup... sigh Snippet from Controller ImgTextController /// <summary> /// This function fixes the height of the image /// </summary> /// <param name="sFile"></param> /// <param name="alternateText"></param> /// <param name="backgroundColour"></param> /// <returns></returns> [AcceptVerbs(HttpVerbs.Get)] public ActionResult FixHeight(string sFile, string alternateText, string backgroundColour) { #region File if (string.IsNullOrEmpty(sFile)) { return new ImgTextResult(); } // MVC specific change to prepend the new directory if (sFile.IndexOf("Content") == -1) { sFile = "~/Content/" + sFile; } // open the file System.Drawing.Image img; try { img = System.Drawing.Image.FromFile(Server.MapPath(sFile)); } catch { img = null; } // did we fail? if (img == null) { return new ImgTextResult(); } #endregion File #region Width // Sort out the width from the image passed to me Int32 nWidth = img.Width; #endregion Width #region Height Int32 nHeight = img.Height; #endregion Height // What is the ideal height given a width of 2100 this should be 1400. var nIdealHeight = (int)(nWidth / 1.40920096852); // So is the actual height of the image already greater than the ideal height? Int32 nSplit; if (nIdealHeight < nHeight) { // Yes, do nothing, well i need to return the iamge... nSplit = 0; } else { // rob wants to not show the white at the top or bottom, so if we were to crop the image how would be do it // 1. Calculate what the width should be If we dont adjust the heigt var newIdealWidth = (int)(nHeight * 1.40920096852); // 2. This newIdealWidth should be smaller than the existing width... so work out the split on that Int32 newSplit = (nWidth - newIdealWidth) / 2; // 3. Now recrop the image using 0-nHeight as the height (i.e. full height) // but crop the sides so that its the correct aspect ration var newRect = new Rectangle(newSplit, 0, newIdealWidth, nHeight); img = CropImage(img, newRect); nHeight = img.Height; nWidth = img.Width; nSplit = 0; } // No, so I want to place this image on a larger canvas and we do this by Creating a new image to be the size that we want System.Drawing.Image canvas = new Bitmap(nWidth, nIdealHeight, PixelFormat.Format24bppRgb); Graphics g = Graphics.FromImage(canvas); #region Color // Whilst we can set the background colour we shall default to white if (string.IsNullOrEmpty(backgroundColour)) { backgroundColour = "FFFFFF"; } Color bc = ColorTranslator.FromHtml("#" + backgroundColour); #endregion Color // Filling the background (which gives us our broder) Brush backgroundBrush = new SolidBrush(bc); g.FillRectangle(backgroundBrush, -1, -1, nWidth + 1, nIdealHeight + 1); // draw the image at the position var rect = new Rectangle(0, nSplit, nWidth, nHeight); g.DrawImage(img, rect); return new ImgTextResult { Image = canvas, ImageFormat = ImageFormat.Png }; } My ImgTextResult is a class that returns an Action result for me but embedding the image from a memory stream into the response.outputstream. snippet from my ImageResults /// <summary> /// Execute the result /// </summary> /// <param name="context"></param> public override void ExecuteResult(ControllerContext context) { // output context.HttpContext.Response.Clear(); context.HttpContext.Response.ContentType = "image/png"; try { var memStream = new MemoryStream(); Image.Save(memStream, ImageFormat.Png); context.HttpContext.Response.BinaryWrite(memStream.ToArray()); context.HttpContext.Response.Flush(); context.HttpContext.Response.Close(); memStream.Dispose(); Image.Dispose(); } catch (Exception ex) { string a = ex.Message; } } Now all of this works locally and lovely, and indeed all of this works on my production server BUT Only for Firefox, Safari, Chrome (and other browsers) IE has a fit and decides that it either wont display the image or it does display the image after approx 154seconds of waiting..... I have made sure my HTML is XHTML compliant, I have made sure I am getting no Routing errors or crashes in my event log on the server.... Now obviously I have been a muppet and have done something wrong... but what I cant fathom is why in development all works fine, and in production all non IE browsers also work fine, but IE 8 using IIS 6.0 production server is having some kind of problem in returning this PNG and I dont have an error to trace... so what I am looking for is guidance as to how I can debug this problem.

    Read the article

  • PHP else/if statements

    - by V Neal
    I've written the following PHP statement but everytime i try to combine it into an else/if, it breaks. Can someone please advise? I'm new to PHP and am getting a tad stuck. Thanks :) <?php if (is_page( 19 ) ) {?> <div class="imageSlider"><img src="<?php echo bloginfo('template_directory');?>/Images/mainImages/innerPage-Image.jpg" alt="" /><img src="<?php echo bloginfo('template_directory');?>/Images/mainImages/innerPage-Image2.jpg" alt="" /><img src="<?php echo bloginfo('template_directory');?>/Images/mainImages/innerPage-Image3.jpg" alt="" /></div> <?php }?> <?php if (is_page( 23 ) ) {?> <div class="imageSlider"><img src="<?php echo bloginfo('template_directory');?>/Images/mainImages/innerPage-Image.jpg" alt="" /><img src="<?php echo bloginfo('template_directory');?>/Images/mainImages/innerPage-Image.jpg" alt="" /><img src="<?php echo bloginfo('template_directory');?>/Images/mainImages/innerPage-Image.jpg" alt="" /></div> } <?php }?>

    Read the article

  • jQuery inserting comment help

    - by StealthRT
    Hey all, i am trying to learn how to insert a comment within some html code without having to refresh the page. I know jQuery is capable of inserting a comment into a div area but i am having problems finding an example like that with fading in. Here is my comment code: <div id="CommentBox122" style="width:80%; padding:2px; margin-left:25px;"> <table width="650px" border="0" cellpadding="0" cellspacing="5" style="margin-left:20px; background-color: #F8F8F8; border-bottom:#CCC solid 1px;"><tr> <td width="10%" rowspan="2" align="center" class="Commentimage"><img src="img/avatar/gkrgimmkdhmggfh.jpg" height="60" /></td> <td width="90%" class="Commentposted">Posted by me on Saturday, May 01, 2010 @ 4:37: PM</td></tr> <tr><td class="Commentsaying">this is a test comment</td></tr> </table> <div id="stylized" class="myform" align="center"> <form id="CommentForm122" name="CommentForm122"> <div align="center" style="text-align:center; color:#F00; font-family:Arial, Helvetica, sans-serif; font-weight:bold;">Would you like to leave a comment, Robert?</div> <textarea name="txtComment" class="box" id="txtComment"></textarea> <input name="txtpostid" type="text" id="txtpostid" style="visibility:hidden; display:none; height:0px; width:0px;" value="Demo43639" /> <div class="buttons" align="center"> <button type="button" id="Button122" name="Button122" class="positive" onclick="doStuff();"><img name="Submit" src="img\buttonimgComment.png" alt="" />Post Comment</button> </div> </form> </div> </div> The code i need to insert again would be: <table width="650px" border="0" cellpadding="0" cellspacing="5" style="margin-left:20px; background-color: #F8F8F8; border-bottom:#CCC solid 1px;"><tr> <td width="10%" rowspan="2" align="center" class="Commentimage"><img src="img/avatar/gkrgimmkdhmggfh.jpg" height="60" /></td> <td width="90%" class="Commentposted">Posted by me on Saturday, May 01, 2010 @ 4:37: PM</td></tr> <tr><td class="Commentsaying">this is a test comment</td></tr> </table> But again, i am unable to find an example using jQuery to automatically insert that part of the code under the other "table /table" box.. So after its inserted by jQuery, the code should look like this: <div id="CommentBox122" style="width:80%; padding:2px; margin-left:25px;"> <table width="650px" border="0" cellpadding="0" cellspacing="5" style="margin-left:20px; background-color: #F8F8F8; border-bottom:#CCC solid 1px;"><tr> <td width="10%" rowspan="2" align="center" class="Commentimage"><img src="img/avatar/gkrgimmkdhmggfh.jpg" height="60" /></td> <td width="90%" class="Commentposted">Posted by me on Saturday, May 01, 2010 @ 4:37: PM</td></tr> <tr><td class="Commentsaying">this is a test comment</td></tr> </table> <table width="650px" border="0" cellpadding="0" cellspacing="5" style="margin-left:20px; background-color: #F8F8F8; border-bottom:#CCC solid 1px;"><tr> <td width="10%" rowspan="2" align="center" class="Commentimage"><img src="img/avatar/gkrgimmkdhmggfh.jpg" height="60" /></td> <td width="90%" class="Commentposted">Posted by me on Saturday, May 01, 2010 @ 4:37: PM</td></tr> <tr><td class="Commentsaying">this is a test comment</td></tr> </table> <div id="stylized" class="myform" align="center"> <form id="CommentForm122" name="CommentForm122"> <div align="center" style="text-align:center; color:#F00; font-family:Arial, Helvetica, sans-serif; font-weight:bold;">Would you like to leave a comment, Robert?</div> <textarea name="txtComment" class="box" id="txtComment"></textarea> <input name="txtpostid" type="text" id="txtpostid" style="visibility:hidden; display:none; height:0px; width:0px;" value="Demo43639" /> <div class="buttons" align="center"> <button type="button" id="Button122" name="Button122" class="positive" onclick="doStuff();"><img name="Submit" src="img\buttonimgComment.png" alt="" />Post Comment</button> </div> </form> </div> </div> As always, any help would be great! :o) David

    Read the article

  • Lining up Divs, while using JQuery

    - by user630581
    I am trying to create a flash header like element in JQuery, that has three images that fade to other images. I have each group of images in a div, but the divs line up vertically down the page, I want them to line up horizontally in a row. Currently my css code is: div#demos{ width:940px; border:0; } .s1{ float:left; display:inline; background-color:#000000; width:225px; margin:0; } .s2{ float:right; display:inline; background-color:#000000; width:225px; margin:0; } .s3{ float:left; display:inline; background-color:#000000; width:225px; margin:0; } and my markup is: <div id="demos"> <div id="s1" class="pics"> <img src="Image1.jpeg" width="200" height="200" /> <img src="Image2.jpeg" width="200" height="200" /> <img src="Image3.jpeg" width="200" height="200" /> </div> <div id="s2" class="pics"> <img src="Image4.jpeg" width="200" height="200" /> <img src="Image5.jpeg" width="200" height="200" /> <img src="Image6.jpeg" width="200" height="200" /> </div> <div id="s3" class="pics"> <img src="Image7.jpeg" width="200" height="200" /> <img src="Image8.jpeg" width="200" height="200" /> <img src="Image9.jpeg" width="200" height="200" /> </div> <div style="clear:both"></div> </div>

    Read the article

  • Click to make body text larger | JavaScript

    - by Wayne
    Please note this is just an example: <img src="img/normal-font.png" onclick="javascript:document.body.style.fontSize = '13px';" /> &nbsp; <img src="img/medium-font.png" onclick="javascript:document.body.style.fontSize = '14px';" /> &nbsp; <img src="img/large-font.png"onclick="javascript:document.body.style.fontSize = '15px';" /> The body text does indeed enlarge if I choose one of them, but what I like to include is remembering what option you've chosen by reading cookies. In fact, I have no experience in creating cookies in JS, only in PHP. Could someone come up with an example of how to make cookies the simpliest way remembering my option, but whenever someone clicks another one, it should get rid of the cookie that was last set, e.g. Cookie value has 15px, then should update it or remove it with a new cookie with a new value of 13px and so on. Thanks :)

    Read the article

  • Annoying Bug in banner cycle

    - by Davemof
    I have created a rotating banner script for a new site I'm developing View banner here(it rotates every 10 seconds) Unfortunately to the transition seems to be a biut buggy, and the image will fade out, show the same image again and then fade in the new one. I think I have made a simple error somewhere, but can't figure out where it is. the code used to cycle the banners is: In document ready: if ($('.home').length > 0){ $('<img width="100%" />').attr('src', '/assets/img/backgrounds/home/hero'+homecount+'.jpg').load(function(){ $('.hero').append( $(this) ); $('.hero img').fadeIn('medium').delay(10000).fadeOut('slow', loopImages); setHeroHeight(); }); } Outside document ready: function loopImages(){ homecount = homecount+1; if (homecount > 5){ homecount = 1; } $('.hero img') .attr('src', '/assets/img/backgrounds/home/hero'+homecount+'.jpg') .load(function(){ $('.hero img').fadeIn('fast')}).delay(10000).fadeOut('slow', loopImages); } Any help would be greatly appreciated Thanks Dave

    Read the article

  • Adding animation to my images with JQuery

    - by slandau
    Here is my home page: <%@ Page Language="C#" MasterPageFile="~/Views/Home/Home.Master" Inherits="System.Web.Mvc.ViewPage" %> <asp:Content ID="Content2" ContentPlaceHolderID="IndicationContentPlaceHolder" runat="server"> <table id="home" style="margin-left: auto; margin-right:auto;"> <td id="homeLinks"> <div style="padding-left:35px;" id="homeListing" class="containerMid"> <div id="homeView"> <table style="margin-left: auto; margin-right:auto;"> <tr> <tr> <td id="btnIcOld" style="text-align:center;cursor:pointer;"> <img src="<%= VirtualPathUtility.ToAbsolute("~/img/chic/Load.png")%>" /> </td> <td id="btnIc" style="text-align:center;cursor:pointer;"> <img src="<%= VirtualPathUtility.ToAbsolute("~/img/chic/Bar_Chart.png")%>" /> </td> <td id="btnPricing" style="text-align:center;cursor:pointer;"> <img src="<%= VirtualPathUtility.ToAbsolute("~/img/chic/Pie_Chart_disabled.png")%>" /> </td> <td id="btnSheets" style="text-align:center;cursor:pointer;"> <img src="<%= VirtualPathUtility.ToAbsolute("~/img/chic/Line_Chart_disabled.png")%>" /> </td> <td id="btnPort" style="text-align:center;cursor:pointer;"> <img src="<%= VirtualPathUtility.ToAbsolute("~/img/chic/Modify_disabled.png")%>" /> </td> <td id="btnAdmin" style="text-align:center;cursor:pointer;"> <img src="<%= VirtualPathUtility.ToAbsolute("~/img/chic/Profile_disabled.png")%>" /> </td> </tr> <tr> <td id="Td1"> <b>Indications Calculator | </b> </td> <td id="lblIc"> <b>Indications Calculator - Beta | </b> </td> <td id="lblPricing"> <b>Managing Pricing Triggers | </b> </td> <td id="lblSheets"> <b>Creating Pricing Sheets | </b> </td> <td id="lblPort"> <b>Portfolio Analysis | </b> </td> <td id="lblAdmin"> <b>Administration</b> </td> </tr> </tr> </table> </div> </div> </td> </table> <div id="pageMessage"></div> <script> $(document).ready(function () { $('#btnIc').live('click', function () { window.location.href = "<%=Url.Action("Indications") %>"; }); $('#btnIcOld').live('click', function () { window.location.href = 'https://extranetint/swap'; }); $('#btnPricing').live('click', function () { //window.location.href = "<%=Url.Action("Triggers") %>"; }); $('#btnSheets').live('click', function () { //window.location.href = "<%=Url.Action("Sheets") %>"; }); $('#btnPort').live('click', function () { //window.location.href = "<%=Url.Action("Analysis") %>"; }); $('#btnAdmin').live('click', function () { //window.location.href = "<%=Url.Action("Admin") %>"; }); }); </script> </asp:Content> How can I, with JQuery (or really anything), achieve a mouse-over effect on my images where they will grow a little bit as you hover over them? I tried using JQuery animate but for some reason I couldn't get it to work. Thanks!

    Read the article

  • How do I show and position an Image initialized in the codebehind on my page?

    - by Andreas Strandfelt
    Hello. I have created a simple method to check if an image has been approved and finally returns it as an control. But how do i call and show it on the page? I've tried something like this in the aspx-file: <% SendImage("DKBygMiniLogo.gif", "True"); %> Here is the simple method: protected Image SendImage(object Image, object Approved) { bool approved = Convert.ToBoolean(Approved); Image img = new Image(); if (approved) { img.ImageUrl = "~/images/Ads/" + Image.ToString(); img.Visible = true; } else { img.ImageUrl = "~/images/Ads/" + Image.ToString(); img.Visible = false; } return img; } How do I actually show the image?

    Read the article

  • index seems to be out of sync for jquery .keydown and .click methods

    - by Growler
    I'd like to navigate images using both keyboard and mouse (clicking left and right arrow images). I'm using Jquery to do this, but the shared imgIndex seems to be off from the .keydown function and the .click function... Whenever .keydown function -- or ++ the imgIndex, isn't that changed index also used in the click function? So shouldn't they always be on the same index? keydown function: <script type="text/javascript"> var imgArray = [<?php echo implode(',', getImages($site)) ?>]; $(document).ready(function() { var img = document.getElementById("showimg"); img.src = imgArray[<?php echo $imgid ?>]; var imgIndex = <?php echo $imgid ?>; alert(imgIndex); $(document).keydown(function (e) { var key = e.which; var rightarrow = 39; var leftarrow = 37; var random = 82; if (key == rightarrow) { imgIndex++; if (imgIndex > imgArray.length-1) { imgIndex = 0; } img.src = imgArray[imgIndex]; } if (key == leftarrow) { if (imgIndex == 0) { imgIndex = imgArray.length; } img.src = imgArray[--imgIndex]; } }); click function: Connected to left and right clickable images $("#next").click(function() { imgIndex++; if (imgIndex > imgArray.length-1) { imgIndex = 0; } img.src = imgArray[imgIndex]; }); $("#prev").click(function() { if (imgIndex == 0) { imgIndex = imgArray.length; } img.src = imgArray[--imgIndex]; }); }); Just so you have some visibility into the getImages php function: <?php function getImages($siteParam) { include 'dbconnect.php'; if ($siteParam == 'artwork') { $table = "artwork"; } else { $table = "comics"; } $catResult = $mysqli->query("SELECT id, title, path, thumb, views, catidFK FROM $table"); $img = array(); while($row = $catResult->fetch_assoc()) { $img[] = "'" . $row['path'] . "'"; } return $img; } ?> Much appreciated! Snapshot of where the script is on "view image.php"

    Read the article

  • Problem on style a button

    - by BTGMarco
    Hello i am new on Silverlight, i tring to make a base for a button and that button will change the central image accoring to the situation, however some parts will continue the same, for this reason i make a UserControl and i call that user Control from the code and add to the grid that i need. But this Usercontrol that i am trying to add have a style pre-defined and i don´t geted how i change de image background. Here are the code that i am using; ModelsBase teste = new ModelsBase(); Image img = new Image(); img.Source = new BitmapImage(new Uri("../../Images/person.png", UriKind.RelativeOrAbsolute)); img.Stretch = Stretch.Fill;img.ImageOpened += new EventHandler<RoutedEventArgs>(img_ImageOpened); img.Height = img.Width = 128; teste.Conteudo.HorizontalAlignment = HorizontalAlignment.Left; this.ContentModels.Children.Add(teste); The envent img_ImageOpened is called so the image is loaded, but not is displayed. Sorry for bad english If someone find out where is the problem, please aswer

    Read the article

  • How do I make a multiple file upload?

    - by Bluemagica
    I am trying to make a multiple image uploader. The file upload fields are being added in the form dynamically using jquery. I tried making an array of the fields since I don't want to have a hidden field. so my generated upload fields look like <input type="file" id="img0" name="img[]"/> <input type="file" id="img1" name="img[]"/> <input type="file" id="img2" name="img[]"/> ..... .. And on the php side I did something like if(isset($_FILES['img'])) { foreach($_FILES['img'] as $k=>$v) { if($v!="") { uploadImage($k,0,0,0,"content/gallery/"); } } } Now I know I am way too wrong, since in that code I am looping through the 'img' file's properties instead of all images....but I have no idea how to fix this. PS: uploadImage is a function I wrote which expects the file input field's name as the first parameter.

    Read the article

  • dynamically double image size

    - by Edan Duarte
    I have an embarrassingly simple question: How can I display an image at double its size without hard coding the width and height attributes? Here's what I tried, but I ended up having to just enter 1000 for width and height. Is something wrong with my function? Thanks! <img onload="double(self.id);" name="bigPic" id="bigPic" src="album1.jpg" height="1000" width="1000"/> function double(id) { var img = document.getElementById(id); var dblWdth = img.width * 2; var dblHt = img.height * 2; img.height = dblHt; img.width = dblWdth; }

    Read the article

  • PHP contact form sends empty data

    - by Alan Lawlessness
    I am trying to create a HTML5 contact form compatible with computer and mobile devices, when I clicked on send message it jumps into a blank white screen. I do get a email but it contains no information. I am quite new with PHP. For www.rare1.ca/test: <!DOCTYPE html> <html> <head> <title>Responsive HTML5/CSS3 template</title> <meta charset="utf-8" /> <meta name = "viewport" content = "width=device-width, maximum-scale = 1, minimum- scale=1" /> <link rel="stylesheet" type="text/css" href="css/default.css" media="all" /> <link rel="stylesheet" href="css/flexslider.css" type="text/css" /> <link href='http://fonts.googleapis.com/css?family=PT+Sans' rel='stylesheet' type='text/css' /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"> </script> <script src="js/jquery.flexslider.js"></script> <script src="js/default.js"></script> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <script src="js/respond.min.js"></script> <![endif]--> </head> <body> <div id="pagewidth"> <header id="header"> <div class="center"> <nav id="mainNav"> <ul> <li class="active"><a href="#pagewidth"><span>gallery</span></a></li> <li></li> <li></li> <li></li> <li></li> <li><a href="#contactUs"><span>contact us</span></a></li> </ul> </nav> </div> </header> <div id="content"> <section class="row"> <div class="center"> <h1><img src="img/logo.gif" width="142" height="78"></h1> <strong class="subHeading">Coming soon</strong> <div class="gallery"> <ul class="slides"> <li><img src="img/img-gallery.jpg" alt="image" /></li> <li><img src="img/img-gallery2.jpg" alt="image" /></li> <li><img src="img/img-gallery3.jpg" alt="image" /></li> </ul> </div> <div class="buttons"></div> </div> </section> <section id="contactUs" class="row grey"> <div class="center"> <h1>Contact Us</h1> <strong class="subHeading">lorem ipsum dolor sit amet, consectetur adipiscing elit</strong> <div class="columns"> <div class="half"> <form action="sendemail.php" class="form"> <fieldset> <h2>Feedback form</h2> <div class="formRow"> <div class="textField"><input type="text" name="Name" id="name" placeholder="Your name ..." /></div> </div> <div class="formRow"> <div class="textField"><input type="text" name="Email" id="email" placeholder="Your Email ..." /></div> </div> <div class="formRow"> <div class="textField"><textarea name="Message" cols="20" rows="4" placeholder="Your message ..."></textarea> </div> </div> <div class="formRow"> <button class="btnSmall btn submit right"> <span>Send Message</span> </button> </div> </fieldset> </form> </div> <div class="half"> <h2>How to find us</h2> <div id="map"> <div class="imgHolder"><img src="img/map.jpg" alt="google map" /></div> </div> </div> </div> </div> </section> </div> <footer id="footer"> <div class="center"> </div> </footer> </div> </body> </html> <?php // This is the script for sending email. // change the email address below to your own email address. $mailTo = '[email protected]'; $name = htmlspecialchars($_POST['Name']); $mailFrom = htmlspecialchars($_POST['Email']); $message_text = htmlspecialchars($_POST['Message']); $headers = "From: $name <$mailFrom>\n"; $headers .= "Reply-To: $name <$mailFrom>\n"; $message = $message_text; mail($mailTo, $subject, $message, $headers ); ?>

    Read the article

  • Unable to boot Windows 7 after installing Ubuntu

    - by Devendra
    I have Windows 7 on my machine and then installed Ubuntu 12.04 using a live CD. I can see both Windows 7 and Ubuntu in the grub menu, but when I select Windows 7 it shows a black screen for about 2 seconds and the returns to the Grub menu. But if I select Ubuntu it's working fine. This is the contents of the boot-repair log: Boot Info Script 0.61.full + Boot-Repair extra info [Boot-Info November 20th 2012] ============================= Boot Info Summary: =============================== => Grub2 (v2.00) is installed in the MBR of /dev/sda and looks at sector 1 of the same hard drive for core.img. core.img is at this location and looks in partition 1 for (,msdos6)/boot/grub. sda1: __________________________________________________________________________ File system: ntfs Boot sector type: Grub2 (v1.99-2.00) Boot sector info: Grub2 (v2.00) is installed in the boot sector of sda1 and looks at sector 388911128 of the same hard drive for core.img. core.img is at this location and looks in partition 1 for (,msdos6)/boot/grub. No errors found in the Boot Parameter Block. Operating System: Windows 7 Boot files: /bootmgr /Boot/BCD /Windows/System32/winload.exe sda2: __________________________________________________________________________ File system: ntfs Boot sector type: Windows Vista/7: NTFS Boot sector info: No errors found in the Boot Parameter Block. Operating System: Boot files: sda3: __________________________________________________________________________ File system: ntfs Boot sector type: Windows Vista/7: NTFS Boot sector info: No errors found in the Boot Parameter Block. Operating System: Boot files: sda4: __________________________________________________________________________ File system: Extended Partition Boot sector type: - Boot sector info: sda5: __________________________________________________________________________ File system: ntfs Boot sector type: Windows Vista/7: NTFS Boot sector info: According to the info in the boot sector, sda5 starts at sector 2048. Operating System: Boot files: sda6: __________________________________________________________________________ File system: ext4 Boot sector type: - Boot sector info: Operating System: Ubuntu 12.10 Boot files: /boot/grub/grub.cfg /etc/fstab /boot/grub/i386-pc/core.img sda7: __________________________________________________________________________ File system: swap Boot sector type: - Boot sector info: ============================ Drive/Partition Info: ============================= Drive: sda _____________________________________________________________________ Disk /dev/sda: 750.2 GB, 750156374016 bytes 255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes Partition Boot Start Sector End Sector # of Sectors Id System /dev/sda1 * 206,848 146,802,687 146,595,840 7 NTFS / exFAT / HPFS /dev/sda2 147,007,488 293,623,807 146,616,320 7 NTFS / exFAT / HPFS /dev/sda3 293,623,808 332,820,613 39,196,806 7 NTFS / exFAT / HPFS /dev/sda4 332,822,526 1,465,145,343 1,132,322,818 f W95 Extended (LBA) /dev/sda5 461,342,720 1,465,145,343 1,003,802,624 7 NTFS / exFAT / HPFS /dev/sda6 332,822,528 453,171,199 120,348,672 83 Linux /dev/sda7 453,173,248 461,338,623 8,165,376 82 Linux swap / Solaris "blkid" output: ________________________________________________________________ Device UUID TYPE LABEL /dev/sda1 F6AE2C13AE2BCB47 ntfs /dev/sda2 DC2273012272DFC6 ntfs /dev/sda3 1E76E43376E40D79 ntfs New Volume /dev/sda5 5ED60ACDD60AA57D ntfs /dev/sda6 9e70fd16-b48b-4f88-adcf-e443aef83124 ext4 /dev/sda7 52f3dd94-6be7-4a7b-a3ae-f43eb8810483 swap ================================ Mount points: ================================= Device Mount_Point Type Options /dev/sda6 / ext4 (rw,errors=remount-ro) =========================== sda6/boot/grub/grub.cfg: =========================== -------------------------------------------------------------------------------- # # DO NOT EDIT THIS FILE # # It is automatically generated by grub-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub # ### BEGIN /etc/grub.d/00_header ### if [ -s $prefix/grubenv ]; then set have_grubenv=true load_env fi set default="0" if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" else menuentry_id_option="" fi export menuentry_id_option if [ "${prev_saved_entry}" ]; then set saved_entry="${prev_saved_entry}" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi function savedefault { if [ -z "${boot_once}" ]; then saved_entry="${chosen}" save_env saved_entry fi } function recordfail { set recordfail=1 if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi } function load_video { if [ x$feature_all_video_module = xy ]; then insmod all_video else insmod efi_gop insmod efi_uga insmod ieee1275_fb insmod vbe insmod vga insmod video_bochs insmod video_cirrus fi } if [ x$feature_default_font_path = xy ] ; then font=unicode else insmod part_msdos insmod ext2 set root='hd0,msdos6' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 9e70fd16-b48b-4f88-adcf-e443aef83124 else search --no-floppy --fs-uuid --set=root 9e70fd16-b48b-4f88-adcf-e443aef83124 fi font="/usr/share/grub/unicode.pf2" fi if loadfont $font ; then set gfxmode=auto load_video insmod gfxterm set locale_dir=$prefix/locale set lang=en_IN insmod gettext fi terminal_output gfxterm if [ "${recordfail}" = 1 ]; then set timeout=10 else set timeout=10 fi ### END /etc/grub.d/00_header ### ### BEGIN /etc/grub.d/05_debian_theme ### set menu_color_normal=white/black set menu_color_highlight=black/light-gray if background_color 44,0,30; then clear fi ### END /etc/grub.d/05_debian_theme ### ### BEGIN /etc/grub.d/10_linux ### function gfxmode { set gfxpayload="${1}" if [ "${1}" = "keep" ]; then set vt_handoff=vt.handoff=7 else set vt_handoff= fi } if [ "${recordfail}" != 1 ]; then if [ -e ${prefix}/gfxblacklist.txt ]; then if hwmatch ${prefix}/gfxblacklist.txt 3; then if [ ${match} = 0 ]; then set linux_gfx_mode=keep else set linux_gfx_mode=text fi else set linux_gfx_mode=text fi else set linux_gfx_mode=keep fi else set linux_gfx_mode=text fi export linux_gfx_mode if [ "${linux_gfx_mode}" != "text" ]; then load_video; fi menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-9e70fd16-b48b-4f88-adcf-e443aef83124' { recordfail gfxmode $linux_gfx_mode insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos6' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 9e70fd16-b48b-4f88-adcf-e443aef83124 else search --no-floppy --fs-uuid --set=root 9e70fd16-b48b-4f88-adcf-e443aef83124 fi linux /boot/vmlinuz-3.5.0-17-generic root=UUID=9e70fd16-b48b-4f88-adcf-e443aef83124 ro quiet splash $vt_handoff initrd /boot/initrd.img-3.5.0-17-generic } submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-9e70fd16-b48b-4f88-adcf-e443aef83124' { menuentry 'Ubuntu, with Linux 3.5.0-17-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-17-generic-advanced-9e70fd16-b48b-4f88-adcf-e443aef83124' { recordfail gfxmode $linux_gfx_mode insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos6' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 9e70fd16-b48b-4f88-adcf-e443aef83124 else search --no-floppy --fs-uuid --set=root 9e70fd16-b48b-4f88-adcf-e443aef83124 fi echo 'Loading Linux 3.5.0-17-generic ...' linux /boot/vmlinuz-3.5.0-17-generic root=UUID=9e70fd16-b48b-4f88-adcf-e443aef83124 ro quiet splash $vt_handoff echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-3.5.0-17-generic } menuentry 'Ubuntu, with Linux 3.5.0-17-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-17-generic-recovery-9e70fd16-b48b-4f88-adcf-e443aef83124' { recordfail insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos6' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 9e70fd16-b48b-4f88-adcf-e443aef83124 else search --no-floppy --fs-uuid --set=root 9e70fd16-b48b-4f88-adcf-e443aef83124 fi echo 'Loading Linux 3.5.0-17-generic ...' linux /boot/vmlinuz-3.5.0-17-generic root=UUID=9e70fd16-b48b-4f88-adcf-e443aef83124 ro recovery nomodeset echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-3.5.0-17-generic } } ### END /etc/grub.d/10_linux ### ### BEGIN /etc/grub.d/20_linux_xen ### ### END /etc/grub.d/20_linux_xen ### ### BEGIN /etc/grub.d/20_memtest86+ ### menuentry "Memory test (memtest86+)" { insmod part_msdos insmod ext2 set root='hd0,msdos6' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 9e70fd16-b48b-4f88-adcf-e443aef83124 else search --no-floppy --fs-uuid --set=root 9e70fd16-b48b-4f88-adcf-e443aef83124 fi linux16 /boot/memtest86+.bin } menuentry "Memory test (memtest86+, serial console 115200)" { insmod part_msdos insmod ext2 set root='hd0,msdos6' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 9e70fd16-b48b-4f88-adcf-e443aef83124 else search --no-floppy --fs-uuid --set=root 9e70fd16-b48b-4f88-adcf-e443aef83124 fi linux16 /boot/memtest86+.bin console=ttyS0,115200n8 } ### END /etc/grub.d/20_memtest86+ ### ### BEGIN /etc/grub.d/30_os-prober ### menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-F6AE2C13AE2BCB47' { insmod part_msdos insmod ntfs set root='hd0,msdos1' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 F6AE2C13AE2BCB47 else search --no-floppy --fs-uuid --set=root F6AE2C13AE2BCB47 fi chainloader +1 } ### END /etc/grub.d/30_os-prober ### ### BEGIN /etc/grub.d/30_uefi-firmware ### ### END /etc/grub.d/30_uefi-firmware ### ### BEGIN /etc/grub.d/40_custom ### # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. ### END /etc/grub.d/40_custom ### ### BEGIN /etc/grub.d/41_custom ### if [ -f ${config_directory}/custom.cfg ]; then source ${config_directory}/custom.cfg elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then source $prefix/custom.cfg; fi ### END /etc/grub.d/41_custom ### -------------------------------------------------------------------------------- =============================== sda6/etc/fstab: ================================ -------------------------------------------------------------------------------- # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sda6 during installation UUID=9e70fd16-b48b-4f88-adcf-e443aef83124 / ext4 errors=remount-ro 0 1 # swap was on /dev/sda7 during installation UUID=52f3dd94-6be7-4a7b-a3ae-f43eb8810483 none swap sw 0 0 -------------------------------------------------------------------------------- =================== sda6: Location of files loaded by Grub: ==================== GiB - GB File Fragment(s) 162.831275940 = 174.838751232 boot/grub/grub.cfg 1 163.036647797 = 175.059267584 boot/initrd.img-3.5.0-17-generic 1 206.871749878 = 222.126850048 boot/vmlinuz-3.5.0-17-generic 1 163.036647797 = 175.059267584 initrd.img 1 163.036647797 = 175.059267584 initrd.img.old 1 206.871749878 = 222.126850048 vmlinuz 1 =============================== StdErr Messages: =============================== cat: write error: Broken pipe cat: write error: Broken pipe ADDITIONAL INFORMATION : =================== log of boot-repair 2012-12-11__00h59 =================== boot-repair version : 3.195~ppa28~quantal boot-sav version : 3.195~ppa28~quantal glade2script version : 3.2.2~ppa45~quantal boot-sav-extra version : 3.195~ppa28~quantal boot-repair is executed in installed-session (Ubuntu 12.10, quantal, Ubuntu, x86_64) CPU op-mode(s): 32-bit, 64-bit BOOT_IMAGE=/boot/vmlinuz-3.5.0-17-generic root=UUID=9e70fd16-b48b-4f88-adcf-e443aef83124 ro quiet splash vt.handoff=7 =================== os-prober: /dev/sda6:The OS now in use - Ubuntu 12.10 CurrentSession:linux /dev/sda1:Windows 7 (loader):Windows:chain =================== blkid: /dev/sda1: UUID="F6AE2C13AE2BCB47" TYPE="ntfs" /dev/sda2: UUID="DC2273012272DFC6" TYPE="ntfs" /dev/sda3: LABEL="New Volume" UUID="1E76E43376E40D79" TYPE="ntfs" /dev/sda5: UUID="5ED60ACDD60AA57D" TYPE="ntfs" /dev/sda6: UUID="9e70fd16-b48b-4f88-adcf-e443aef83124" TYPE="ext4" /dev/sda7: UUID="52f3dd94-6be7-4a7b-a3ae-f43eb8810483" TYPE="swap" 1 disks with OS, 2 OS : 1 Linux, 0 MacOS, 1 Windows, 0 unknown type OS. Warning: extended partition does not start at a cylinder boundary. DOS and Linux will interpret the contents differently. =================== /etc/default/grub : # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: # info -f grub -n 'Simple configuration' GRUB_DEFAULT=0 #GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="" # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef" # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480 # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true" # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1" =================== /etc/grub.d/ : drwxr-xr-x 2 root root 4096 Oct 17 20:29 grub.d total 72 -rwxr-xr-x 1 root root 7541 Oct 14 23:06 00_header -rwxr-xr-x 1 root root 5488 Oct 4 15:00 05_debian_theme -rwxr-xr-x 1 root root 10891 Oct 14 23:06 10_linux -rwxr-xr-x 1 root root 10258 Oct 14 23:06 20_linux_xen -rwxr-xr-x 1 root root 1688 Oct 11 19:40 20_memtest86+ -rwxr-xr-x 1 root root 10976 Oct 14 23:06 30_os-prober -rwxr-xr-x 1 root root 1426 Oct 14 23:06 30_uefi-firmware -rwxr-xr-x 1 root root 214 Oct 14 23:06 40_custom -rwxr-xr-x 1 root root 216 Oct 14 23:06 41_custom -rw-r--r-- 1 root root 483 Oct 14 23:06 README =================== UEFI/Legacy mode: This installed-session is not in EFI-mode. EFI in dmesg. Please report this message to [email protected] [ 0.000000] ACPI: UEFI 00000000bafe7000 0003E (v01 DELL QA09 00000002 PTL 00000002) [ 0.000000] ACPI: UEFI 00000000bafe6000 00042 (v01 PTL COMBUF 00000001 PTL 00000001) [ 0.000000] ACPI: UEFI 00000000bafe3000 00256 (v01 DELL QA09 00000002 PTL 00000002) SecureBoot disabled. =================== PARTITIONS & DISKS: sda6 : sda, not-sepboot, grubenv-ok grub2, grub-pc , update-grub, 64, with-boot, is-os, not--efi--part, fstab-without-boot, fstab-without-efi, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot, apt-get, grub-install, with--usr, fstab-without-usr, not-sep-usr, standard, farbios, . sda1 : sda, not-sepboot, no-grubenv nogrub, no-docgrub, no-update-grub, 32, no-boot, is-os, not--efi--part, part-has-no-fstab, part-has-no-fstab, no-nt, haswinload, no-recov-nor-hid, bootmgr, is-winboot, nopakmgr, nogrubinstall, no---usr, part-has-no-fstab, not-sep-usr, standard, not-far, /mnt/boot-sav/sda1. sda2 : sda, not-sepboot, no-grubenv nogrub, no-docgrub, no-update-grub, 32, no-boot, no-os, not--efi--part, part-has-no-fstab, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot, nopakmgr, nogrubinstall, no---usr, part-has-no-fstab, not-sep-usr, standard, farbios, /mnt/boot-sav/sda2. sda3 : sda, not-sepboot, no-grubenv nogrub, no-docgrub, no-update-grub, 32, no-boot, no-os, not--efi--part, part-has-no-fstab, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot, nopakmgr, nogrubinstall, no---usr, part-has-no-fstab, not-sep-usr, standard, farbios, /mnt/boot-sav/sda3. sda5 : sda, not-sepboot, no-grubenv nogrub, no-docgrub, no-update-grub, 32, no-boot, no-os, not--efi--part, part-has-no-fstab, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot, nopakmgr, nogrubinstall, no---usr, part-has-no-fstab, not-sep-usr, standard, farbios, /mnt/boot-sav/sda5. sda : not-GPT, BIOSboot-not-needed, has-no-EFIpart, not-usb, has-os, 2048 sectors * 512 bytes =================== parted -l: Model: ATA WDC WD7500BPKT-7 (scsi) Disk /dev/sda: 750GB Sector size (logical/physical): 512B/4096B Partition Table: msdos Number Start End Size Type File system Flags 1 106MB 75.2GB 75.1GB primary ntfs boot 2 75.3GB 150GB 75.1GB primary ntfs 3 150GB 170GB 20.1GB primary ntfs 4 170GB 750GB 580GB extended lba 6 170GB 232GB 61.6GB logical ext4 7 232GB 236GB 4181MB logical linux-swap(v1) 5 236GB 750GB 514GB logical ntfs =================== parted -lm: BYT; /dev/sda:750GB:scsi:512:4096:msdos:ATA WDC WD7500BPKT-7; 1:106MB:75.2GB:75.1GB:ntfs::boot; 2:75.3GB:150GB:75.1GB:ntfs::; 3:150GB:170GB:20.1GB:ntfs::; 4:170GB:750GB:580GB:::lba; 6:170GB:232GB:61.6GB:ext4::; 7:232GB:236GB:4181MB:linux-swap(v1)::; 5:236GB:750GB:514GB:ntfs::; =================== mount: /dev/sda6 on / type ext4 (rw,errors=remount-ro) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) none on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) udev on /dev type devtmpfs (rw,mode=0755) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620) tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880) none on /run/shm type tmpfs (rw,nosuid,nodev) none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755) gvfsd-fuse on /run/user/dev/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=dev) /dev/sda1 on /mnt/boot-sav/sda1 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096) /dev/sda2 on /mnt/boot-sav/sda2 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096) /dev/sda3 on /mnt/boot-sav/sda3 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096) /dev/sda5 on /mnt/boot-sav/sda5 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096) =================== ls: /sys/block/sda (filtered): alignment_offset bdi capability dev device discard_alignment events events_async events_poll_msecs ext_range holders inflight power queue range removable ro sda1 sda2 sda3 sda4 sda5 sda6 sda7 size slaves stat subsystem trace uevent /sys/block/sr0 (filtered): alignment_offset bdi capability dev device discard_alignment events events_async events_poll_msecs ext_range holders inflight power queue range removable ro size slaves stat subsystem trace uevent /dev (filtered): alarm ashmem autofs binder block bsg btrfs-control bus cdrom cdrw char console core cpu cpu_dma_latency disk dri dvd dvdrw ecryptfs fb0 fb1 fd full fuse hpet input kmsg kvm log mapper mcelog mei mem net network_latency network_throughput null oldmem port ppp psaux ptmx pts random rfkill rtc rtc0 sda sda1 sda2 sda3 sda4 sda5 sda6 sda7 sg0 sg1 shm snapshot snd sr0 stderr stdin stdout uinput urandom v4l vga_arbiter vhost-net video0 zero ls /dev/mapper: control =================== df -Th: Filesystem Type Size Used Avail Use% Mounted on /dev/sda6 ext4 57G 2.7G 51G 6% / udev devtmpfs 1.9G 12K 1.9G 1% /dev tmpfs tmpfs 770M 892K 769M 1% /run none tmpfs 5.0M 0 5.0M 0% /run/lock none tmpfs 1.9G 260K 1.9G 1% /run/shm none tmpfs 100M 44K 100M 1% /run/user /dev/sda1 fuseblk 70G 36G 35G 51% /mnt/boot-sav/sda1 /dev/sda2 fuseblk 70G 66G 4.8G 94% /mnt/boot-sav/sda2 /dev/sda3 fuseblk 19G 87M 19G 1% /mnt/boot-sav/sda3 /dev/sda5 fuseblk 479G 436G 44G 92% /mnt/boot-sav/sda5 =================== fdisk -l: Disk /dev/sda: 750.2 GB, 750156374016 bytes 255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x1dc69d0b Device Boot Start End Blocks Id System /dev/sda1 * 206848 146802687 73297920 7 HPFS/NTFS/exFAT /dev/sda2 147007488 293623807 73308160 7 HPFS/NTFS/exFAT /dev/sda3 293623808 332820613 19598403 7 HPFS/NTFS/exFAT /dev/sda4 332822526 1465145343 566161409 f W95 Ext'd (LBA) Partition 4 does not start on physical sector boundary. /dev/sda5 461342720 1465145343 501901312 7 HPFS/NTFS/exFAT /dev/sda6 332822528 453171199 60174336 83 Linux /dev/sda7 453173248 461338623 4082688 82 Linux swap / Solaris Partition table entries are not in disk order =================== Recommended repair Recommended-Repair This setting will reinstall the grub2 of sda6 into the MBR of sda. Additional repair will be performed: unhide-bootmenu-10s grub-install (GRUB) 2.00-7ubuntu11,grub-install (GRUB) 2. Reinstall the GRUB of sda6 into the MBR of sda Installation finished. No error reported. grub-install /dev/sda: exit code of grub-install /dev/sda:0 update-grub Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.5.0-17-generic Found initrd image: /boot/initrd.img-3.5.0-17-generic Found memtest86+ image: /boot/memtest86+.bin Found Windows 7 (loader) on /dev/sda1 Unhide GRUB boot menu in sda6/boot/grub/grub.cfg Boot successfully repaired. You can now reboot your computer. The boot files of [The OS now in use - Ubuntu 12.10] are far from the start of the disk. Your BIOS may not detect them. You may want to retry after creating a /boot partition (EXT4, >200MB, start of the disk). This can be performed via tools such as gParted. Then select this partition via the [Separate /boot partition:] option of [Boot Repair]. (https://help.ubuntu.com/community/BootPartition)

    Read the article

  • Cannot find root device after latest kernel upgrade

    - by DisgruntledGoat
    I'm running Ubuntu 13.04. Yesterday I tried to install updates but there was an error, and it suggested running apt-get -f install which I did. Now when I try to boot, I get an error "Gave up waiting for root device". The text is almost identical to the text shown in this and this question. However, the "built-in shell" simply doesn't work! Nothing I type shows up on the screen or does anything. I tried adding a rootdelay to grub but it just waits longer and shows the same screen. Loading the previous kernel works (although there are a few graphics glitches) but as far as I can tell, it should be booting the exact same stuff. The new kernel is 3.8.0-31-generic and the previous working one is 3.8.0-25-generic. Here is my entire /boot/grub/menu.lst file, comments removed: default 0 timeout 3 title Ubuntu 13.04, kernel 3.8.0-31-generic uuid c690c1e6-beb9-46e7-85c2-145cd07d44ac kernel /boot/vmlinuz-3.8.0-31-generic root=UUID=c690c1e6-beb9-46e7-85c2-145cd07d44ac rootdelay=120 ro quiet splash initrd /boot/initrd.img-3.8.0-31-generic quiet title Ubuntu 13.04, kernel 3.8.0-31-generic (recovery mode) uuid c690c1e6-beb9-46e7-85c2-145cd07d44ac kernel /boot/vmlinuz-3.8.0-31-generic root=UUID=c690c1e6-beb9-46e7-85c2-145cd07d44ac ro single initrd /boot/initrd.img-3.8.0-31-generic title Ubuntu 13.04, kernel 3.8.0-25-generic uuid c690c1e6-beb9-46e7-85c2-145cd07d44ac kernel /boot/vmlinuz-3.8.0-25-generic root=UUID=c690c1e6-beb9-46e7-85c2-145cd07d44ac ro quiet splash initrd /boot/initrd.img-3.8.0-25-generic quiet title Ubuntu 13.04, kernel 3.8.0-25-generic (recovery mode) uuid c690c1e6-beb9-46e7-85c2-145cd07d44ac kernel /boot/vmlinuz-3.8.0-25-generic root=UUID=c690c1e6-beb9-46e7-85c2-145cd07d44ac ro single initrd /boot/initrd.img-3.8.0-25-generic title Ubuntu 13.04, kernel 3.8.0-23-generic uuid c690c1e6-beb9-46e7-85c2-145cd07d44ac kernel /boot/vmlinuz-3.8.0-23-generic root=UUID=c690c1e6-beb9-46e7-85c2-145cd07d44ac ro quiet splash initrd /boot/initrd.img-3.8.0-23-generic quiet title Ubuntu 13.04, kernel 3.8.0-23-generic (recovery mode) uuid c690c1e6-beb9-46e7-85c2-145cd07d44ac kernel /boot/vmlinuz-3.8.0-23-generic root=UUID=c690c1e6-beb9-46e7-85c2-145cd07d44ac ro single initrd /boot/initrd.img-3.8.0-23-generic title Ubuntu 13.04, memtest86+ uuid c690c1e6-beb9-46e7-85c2-145cd07d44ac kernel /boot/memtest86+.bin quiet title -------------------------------- root title Windows Vista rootnoverify (hd0,2) savedefault makeactive chainloader +1 As you can see the UUID is the same for all kernels. Why am I getting this problem, and what can I do to fix it?

    Read the article

  • GalleryView Jquery

    - by kwek-kwek
    I am trying to implement this JqueryGallery to my website(big gray box). Now my problem is that the images doesn't appear. here is my header code: <link href="css/galleryview.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="js/jquery.easing.1.3.js"></script> <script type="text/javascript" src="js/jquery.galleryview-2.1.1.js"></script> <script type="text/javascript" src="js/jquery.timers-1.2.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#photos').galleryView({ panel_width: 655, panel_height: 336, transition_speed: 1500, transition_interval: 5000, nav_theme: 'dark', border: '1px solid white', pause_on_hover: true, }); }); </script> Here is my gallery code: <div id="photos" class="galleryview"> <div class="panel"> <img src="http://spaceforaname.com/img/gallery/01.jpg" /> <div class="panel-overlay"> <h2>Effet du soleil sur le paysage</h2> <p>Photo by <a href="http://www.sxc.hu/profile/tomharry" target="_blank">tomharry</a>. View full-size photo <a href="http://www.sxc.hu/photo/158829" target="_blank">here</a>.</p> </div> </div> <div class="panel"> <img src="http://spaceforaname.com/img/gallery/02.jpg" /> <div class="panel-overlay"> <h2>Eden</h2> <p>Photo by <a href="http://www.sxc.hu/profile/emsago" target="_blank">emsago</a>. View full-size photo <a href="http://www.sxc.hu/photo/152865" target="_blank">here</a>.</p> </div> </div> <div class="panel"> <img src="http://spaceforaname.com/img/gallery/03.jpg" /> <div class="panel-overlay"> <h2>Snail on the Corn</h2> <p>Photo by <a href="http://www.sxc.hu/profile/baines" target="_blank">baines</a>. View full-size photo <a href="http://www.sxc.hu/photo/34453" target="_blank">here</a>.</p> </div> </div> <div class="panel"> <img src="http://spaceforaname.com/img/gallery/04.jpg" /> <div class="panel-overlay"> <h2>Flowers</h2> <p>Photo by <a href="http://www.sxc.hu/profile/jazza" target="_blank">jazza</a>. View full-size photo <a href="http://www.sxc.hu/photo/990169" target="_blank">here</a>.</p> </div> </div> <div class="panel"> <img src="http://spaceforaname.com/img/gallery/06.jpg" /> <div class="panel-overlay"> <h2>Alone Beach 2B</h2> <p>Photo by <a href="http://www.sxc.hu/profile/sgursozlu" target="_blank">sgursozlu</a>. View full-size photo <a href="http://www.sxc.hu/photo/738279" target="_blank">here</a>.</p> </div> </div> </div>

    Read the article

  • CSS sprite, what html tag to use

    - by yes123
    Hi guys, I am thinking to switch to CSS Sprite for my images. The main problem is I need something compatible with alt attribute. (Seo-purpouse) What Can I use? The first think I thought was to use a standard <img src="1x1.gif" class="mysprite"> The problem is I can't use that because that would like suspicous by google because of this: <img src="1x1.gif" class="mysprite" alt="my keyword1"> <img src="1x1.gif" class="mysprite" alt="my keyword2"> <img src="1x1.gif" class="mysprite" alt="my keyword3"> (the same image "1x1.gif" with different alt text) How we can solve this?

    Read the article

  • Windows 7 doesn't boot after Ubuntu install

    - by Omu
    I had windows 7 installed on my pc, then I installed Ubuntu 10.10/ During the installation process I have chosen to manually set my partitions: I set a 10GB drive for ubuntu root 1GB drive for swap and for boot drive I've chosen the one used by windows 7 Now I can boot ubuntu, I have the windows 7 option in the boot list, but when I choose Windows 7, it shows me a black screen for a second and returns back to boot screen. Boot Info Script 0.55 dated February 15th, 2010 ============================= Boot Info Summary: ============================== = Windows is installed in the MBR of /dev/sda sda1: _________________________________________________________________________ File system: ntfs Boot sector type: Grub 2 Boot sector info: Grub 2 is installed in the boot sector of sda1 and looks at sector 304908237 of the same hard drive for core.img, but core.img can not be found at this location. No errors found in the Boot Parameter Block. Operating System: Windows 7 Boot files/dirs: /bootmgr /Boot/BCD /Windows/System32/winload.exe sda2: _________________________________________________________________________ File system: ntfs Boot sector type: Windows XP Boot sector info: No errors found in the Boot Parameter Block. Operating System: Boot files/dirs: sda3: _________________________________________________________________________ File system: Extended Partition Boot sector type: - Boot sector info: sda5: _________________________________________________________________________ File system: ext4 Boot sector type: - Boot sector info: Operating System: Ubuntu 10.10 Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img sda4: _________________________________________________________________________ File system: swap Boot sector type: - Boot sector info: =========================== Drive/Partition Info: ============================= Drive: sda ___________________ _____________________________________________________ Disk /dev/sda: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes Partition Boot Start End Size Id System /dev/sda1 * 63 62,894,474 62,894,412 7 HPFS/NTFS /dev/sda2 62,894,478 291,579,749 228,685,272 7 HPFS/NTFS /dev/sda3 291,579,811 309,157,937 17,578,127 5 Extended /dev/sda5 291,579,813 309,157,937 17,578,125 83 Linux /dev/sda4 309,159,936 312,580,095 3,420,160 82 Linux swap / Solaris blkid -c /dev/null: ____________________________________________________________ Device UUID TYPE LABEL /dev/sda1 1266BB2766BB0A8D ntfs /dev/sda2 BEDBF1147C76F703 ntfs DATA /dev/sda3: PTTYPE="dos" /dev/sda4 dd38226d-c7c9-4ae5-a726-6d18d34a22e4 swap /dev/sda5 e1dafd1c-f855-406b-8f9a-f9d527c70255 ext4 /dev/sda: PTTYPE="dos" ============================ "mount | grep ^/dev output: =========================== Device Mount_Point Type Options /dev/sda5 / ext4 (rw,errors=remount-ro,commit=0) =========================== sda5/boot/grub/grub.cfg: =========================== # # DO NOT EDIT THIS FILE # # It is automatically generated by grub-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub # ### BEGIN /etc/grub.d/00_header ### if [ -s $prefix/grubenv ]; then set have_grubenv=true load_env fi set default="0" if [ "${prev_saved_entry}" ]; then set saved_entry="${prev_saved_entry}" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi function savedefault { if [ -z "${boot_once}" ]; then saved_entry="${chosen}" save_env saved_entry fi } function recordfail { set recordfail=1 if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi } function load_video { insmod vbe insmod vga } insmod part_msdos insmod ext2 set root='(hd0,msdos5)' search --no-floppy --fs-uuid --set e1dafd1c-f855-406b-8f9a-f9d527c70255 if loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=640x480 load_video insmod gfxterm fi terminal_output gfxterm insmod part_msdos insmod ext2 set root='(hd0,msdos5)' search --no-floppy --fs-uuid --set e1dafd1c-f855-406b-8f9a-f9d527c70255 set locale_dir=($root)/boot/grub/locale set lang=en insmod gettext if [ "${recordfail}" = 1 ]; then set timeout=-1 else set timeout=10 fi ### END /etc/grub.d/00_header ### ### BEGIN /etc/grub.d/05_debian_theme ### set menu_color_normal=white/black set menu_color_highlight=black/light-gray ### END /etc/grub.d/05_debian_theme ### ### BEGIN /etc/grub.d/10_linux ### menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod part_msdos insmod ext2 set root='(hd0,msdos5)' search --no-floppy --fs-uuid --set e1dafd1c-f855-406b-8f9a-f9d527c70255 linux /boot/vmlinuz-2.6.35-22-generic root=UUID=e1dafd1c-f855-406b-8f9a-f9d527c70255 ro quiet splash initrd /boot/initrd.img-2.6.35-22-generic } menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod part_msdos insmod ext2 set root='(hd0,msdos5)' search --no-floppy --fs-uuid --set e1dafd1c-f855-406b-8f9a-f9d527c70255 echo 'Loading Linux 2.6.35-22-generic ...' linux /boot/vmlinuz-2.6.35-22-generic root=UUID=e1dafd1c-f855-406b-8f9a-f9d527c70255 ro single echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-2.6.35-22-generic } ### END /etc/grub.d/10_linux ### ### BEGIN /etc/grub.d/20_linux_xen ### ### END /etc/grub.d/20_linux_xen ### ### BEGIN /etc/grub.d/20_memtest86+ ### menuentry "Memory test (memtest86+)" { insmod part_msdos insmod ext2 set root='(hd0,msdos5)' search --no-floppy --fs-uuid --set e1dafd1c-f855-406b-8f9a-f9d527c70255 linux16 /boot/memtest86+.bin } menuentry "Memory test (memtest86+, serial console 115200)" { insmod part_msdos insmod ext2 set root='(hd0,msdos5)' search --no-floppy --fs-uuid --set e1dafd1c-f855-406b-8f9a-f9d527c70255 linux16 /boot/memtest86+.bin console=ttyS0,115200n8 } ### END /etc/grub.d/20_memtest86+ ### ### BEGIN /etc/grub.d/30_os-prober ### menuentry "Windows 7 (loader) (on /dev/sda1)" { insmod part_msdos insmod ntfs set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set 1266bb2766bb0a8d chainloader +1 } ### END /etc/grub.d/30_os-prober ### ### BEGIN /etc/grub.d/40_custom ### # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. ### END /etc/grub.d/40_custom ### ### BEGIN /etc/grub.d/41_custom ### if [ -f $prefix/custom.cfg ]; then source $prefix/custom.cfg; fi ### END /etc/grub.d/41_custom ### =============================== sda5/etc/fstab: =============================== # /etc/fstab: static file system information. # # Use 'blkid -o value -s UUID' to print the universally unique identifier # for a device; this may be used with UUID= as a more robust way to name # devices that works even if disks are added and removed. See fstab(5). # # proc /proc proc nodev,noexec,nosuid 0 0 /dev/sda5 / ext4 errors=remount-ro 0 1 # swap was on /dev/sda4 during installation UUID=dd38226d-c7c9-4ae5-a726-6d18d34a22e4 none swap sw 0 0 =================== sda5: Location of files loaded by Grub: =================== 156.1GB: boot/grub/core.img 156.3GB: boot/grub/grub.cfg 149.9GB: boot/initrd.img-2.6.35-22-generic 156.3GB: boot/vmlinuz-2.6.35-22-generic 149.9GB: initrd.img 156.3GB: vmlinuz

    Read the article

  • Java script Gallery - how to show a next image with an arrow - shiftImg(1)

    - by Srikanth Naidu
    //html file Image slideshow </script>   Loading image. Please wait 1     1/12 2/12 3/12 4/12 5/12 6/12 7/12 8/12   // //JS File var displayWaitMessage=true; // Display a please wait message while images are loading? var activeImage = false; var imageGalleryLeftPos = false; var imageGalleryWidth = false; var imageGalleryObj = false; var maxGalleryXPos = false; var slideSpeed = 0; var imageGalleryCaptions = new Array(); function startSlide(e) { if(document.all)e = event; var id = this.id; this.getElementsByTagName('IMG')[0].src = 'images/' + this.id + '_over.gif'; if(this.id=='arrow_right'){ slideSpeedMultiply = Math.floor((e.clientX - this.offsetLeft) / 5); slideSpeed = -1*slideSpeedMultiply; slideSpeed = Math.max(-10,slideSpeed); }else{ slideSpeedMultiply = 10 - Math.floor((e.clientX - this.offsetLeft) / 5); slideSpeed = 1*slideSpeedMultiply; slideSpeed = Math.min(10,slideSpeed); if(slideSpeed<0)slideSpeed=10; } } function releaseSlide() { var id = this.id; this.getElementsByTagName('IMG')[0].src = 'images/' + this.id + '.gif'; slideSpeed=0; } function gallerySlide() { if(slideSpeed!=0){ var leftPos = imageGalleryObj.offsetLeft; leftPos = leftPos/1 + slideSpeed; if(leftPos>maxGalleryXPos){ leftPos = maxGalleryXPos; slideSpeed = 0; } if(leftPos<minGalleryXPos){ leftPos = minGalleryXPos; slideSpeed=0; } imageGalleryObj.style.left = leftPos + 'px'; } setTimeout('gallerySlide()',20); } function showImage() { if(activeImage){ activeImage.style.filter = 'alpha(opacity=50)'; activeImage.style.opacity = 0.5; } this.style.filter = 'alpha(opacity=100)'; this.style.opacity = 1; activeImage = this; } function initSlideShow() { document.getElementById('arrow_left').onmousemove = startSlide; document.getElementById('arrow_left').onmouseout = releaseSlide; document.getElementById('arrow_right').onmousemove = startSlide; document.getElementById('arrow_right').onmouseout = releaseSlide; imageGalleryObj = document.getElementById('theImages'); imageGalleryLeftPos = imageGalleryObj.offsetLeft; imageGalleryWidth = document.getElementById('galleryContainer').offsetWidth - 80; maxGalleryXPos = imageGalleryObj.offsetLeft; minGalleryXPos = imageGalleryWidth - document.getElementById('slideEnd').offsetLeft; var slideshowImages = imageGalleryObj.getElementsByTagName('IMG'); for(var no=0;no<slideshowImages.length;no++){ slideshowImages[no].onmouseover = showImage; } var divs = imageGalleryObj.getElementsByTagName('DIV'); for(var no=0;no<divs.length;no++){ if(divs[no].className=='imageCaption')imageGalleryCaptions[imageGalleryCaptions.length] = divs[no].innerHTML; } gallerySlide(); } function showPreview(imagePath,imageIndex){ var subImages = document.getElementById('previewPane').getElementsByTagName('IMG'); if(subImages.length==0){ var img = document.createElement('IMG'); document.getElementById('previewPane').appendChild(img); }else img = subImages[0]; if(displayWaitMessage){ document.getElementById('waitMessage').style.display='inline'; } document.getElementById('largeImageCaption').style.display='none'; img.onload = function() { hideWaitMessageAndShowCaption(imageIndex-1); }; img.src = imagePath; } function hideWaitMessageAndShowCaption(imageIndex) { document.getElementById('waitMessage').style.display='none'; document.getElementById('largeImageCaption').innerHTML = imageGalleryCaptions[imageIndex]; document.getElementById('largeImageCaption').style.display='block'; } function shiftImg(imageIndex){ } window.onload = initSlideShow;

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >