#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Location
    Delhi
    Posts
    13
    Rep Power
    0

    Changing image by chaning img.src


    Hi,

    why this code doesn't display image properly in chrome ( i.e unlike firefox chrome do wait till image loads completely and firefox shows image while loading

    function loadXMLDoc(j)
    {


    document.getElementById("w1").src="";

    document.getElementById("w1").src="ak.gif";

    }



    thanks
    Last edited by apnavarun; September 5th, 2013 at 07:09 AM. Reason: change in code
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    101
    Rep Power
    27
    Do you mean that in chrome the rest of the page readjusts to fill empty space while the image loads? Try adding width and height attributes to the img tag?

IMN logo majestic logo threadwatch logo seochat tools logo