Hi all, i am new here But i am hoping you can help me with a javascript i am using. I have it working fine where when you rollover any image in a group of images it changes a seperate image to give information about the thumbnail you are rolling over. However i would like to if possible add a delay on the mouseout change so that as you rollover different images it doesn't keep flashing back to the original image.....
Here is my code:
and thenCode:<head> <SCRIPT language="JavaScript"> <!-- if (document.images) { image_off= new Image(200,300); image_off.src="images/sidebarmus.png"; image2= new Image(200,300); image2.src="images/sidebarhermitage.gif"; image3= new Image(200,300); image3.src="images/sidebarhorniman.gif"; image4= new Image(200,300); image4.src="images/sidebarmaritime.gif"; image5= new Image(200,300); image5.src="images/sidebarseedbank.gif"; image6= new Image(200,300); image6.src="images/sidebarroyalalbert.gif"; image7= new Image(200,300); image7.src="images/sidebarjohnsoanes.gif"; image8= new Image(200,300); image8.src="images/sidebarwhitetower.gif"; image9= new Image(200,300); image9.src="images/sidebarva.gif"; } function change1(picName,imgName) { if (document.images) { imgOn=eval(imgName + ".src"); document[picName].src= imgOn; } } //--> </SCRIPT> </head>
for the different thumbnails...Code:onMouseover="change1('pic1','image2')" onMouseout="change1('pic1','image_off')">
i tried
and then:Code:function change2(picName,imgName,Delay) { if (document.images) { imgOn=eval(imgName + ".src"); document[picName].src= imgOn; } delay? setTimeout(execute,delay) : execute(); }
but that didn't seem to work.Code:onMouseout="change2('pic1','image_off',500)">
Any help would be greatly appreciated



Reply With Quote

i shoulda got that one! eheh

Bookmarks