Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image Roll-Over Script 1

Status
Not open for further replies.

markasey

Technical User
Dec 19, 2000
3
US
Somebody gave me the following generic script to create an "Image Roll-Over" effect on a page. If I have images named "cm_learn.gif" and "cm_learn_roll.gif", can anyone figure out how I plug these names into this script so that it will work? I can't seem to get it right.

<a href=&quot;&quot;><img src=&quot;image1.gif&quot; onMouseOver=&quot;image1.src='images/image1_over.gif'&quot; onMouseOut=&quot;image1.src='images/image1.gif'&quot; name=&quot;image1&quot; border=0></a>

Thanks,
Mark
 

<a href=&quot;javascript:void(0)&quot;><img src=&quot;cm_learn.gif&quot; onMouseOver=&quot;this.src='cm_learn_over.gif'&quot; onMouseOut=&quot;this.src='cm_learn.gif&quot; name=&quot;image1&quot; border=0></a>

I think what would have been happening was you were not giving the right address for the object, image whose src you were changing, it should have been:


document.image1.src..


but using this is even easier! Oh which browser are you testing with? Also you should have something in the href like javascript:void(0), if you want nothing to happen. I think you have just left that out for simplification though.

-Ben

&quot;Alright whatever man, I'll hook up the hair, but I aint touchin the ring...Cause I'm still a pla--yer&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top