Hi all;
I have a bunch of thumbnails on the bottom of a page. When a user clicks the thumbnail, the source for an image object ('displayimg') gets set and some description text is displayed.
My problem is that I would like to set the text to be invisible untill the image has fully loaded. I have coded it so that when a thumbmail gets clicked the information text is initially set as being invisible (tried both display='none' and style.visibility='hidden'). Following this I then set the displayimg src to the required image. In the img object decleration I have set an onLoad="showText()" procedure which is supposed to set the text to display (tried display='' and style.visibility='visible') after the image is fully loaded.
Unfortunately the showText() procedure seems to fire immediately without waiting for the image to fully load. Strange, I think perhaps this is because I am dynamically reassigning the src of the image object using javascript.
Does anybody have any recommendations on how I might tackle this problem?
Any and all help is greatly appreciated!
Sean.![[peace] [peace] [peace]](/data/assets/smilies/peace.gif)
I have a bunch of thumbnails on the bottom of a page. When a user clicks the thumbnail, the source for an image object ('displayimg') gets set and some description text is displayed.
My problem is that I would like to set the text to be invisible untill the image has fully loaded. I have coded it so that when a thumbmail gets clicked the information text is initially set as being invisible (tried both display='none' and style.visibility='hidden'). Following this I then set the displayimg src to the required image. In the img object decleration I have set an onLoad="showText()" procedure which is supposed to set the text to display (tried display='' and style.visibility='visible') after the image is fully loaded.
Unfortunately the showText() procedure seems to fire immediately without waiting for the image to fully load. Strange, I think perhaps this is because I am dynamically reassigning the src of the image object using javascript.
Does anybody have any recommendations on how I might tackle this problem?
Any and all help is greatly appreciated!
Sean.
![[peace] [peace] [peace]](/data/assets/smilies/peace.gif)