Jump to content

Mouseover


Kristian_C

Recommended Posts

Hey guys/gals, cant say i understand this, i needed a mouseover/rollover function so thought i chould look for it at w3schools.com and i found it under js animation, i tried it on w3schools and it worked, but as fast as i tried it in my own script it whould not work at all...

Just copied the code, not all tags and stuff... so its all there... i hope :pfunction mouseOver(){document.linksend.src ="utfør01_over-united-mafia.gif"}function mouseOut(){document.linksend.src ="utfør01_normal-united-mafia.gif"}<a href="sendmelding.html" name="linksend"><img onMouseOver="mouseOver()" onMouseOut="mouseOut" src="utfør01_normal-united-mafia.gif"></a>

Link to comment
Share on other sites

<html><head><script type='text/javascript'>function mouseOver(element){element.src ="over.jpg"}function mouseOut(element){element.src ="normal.jpg"}</script></head><body><a href="sendmelding.html" name="linksend"><img onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)" src="normal.jpg"></a></body></html>

Link to comment
Share on other sites

<html><head><script type='text/javascript'>function mouseOver(element){element.src ="over.jpg"}function mouseOut(element){element.src ="normal.jpg"}</script></head><body><a href="sendmelding.html" name="linksend"><img onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)" src="normal.jpg"></a></body></html>

Well tried to use it, but still dont work tho... Code now looks like this, dident change anything but names actually....
<html><head><script type='text/javascript'>function mouseOver(element){element.src ="styleup/diverse-knapper/utfør01_over-united-mafia.gif"}function mouseOut(element){element.src ="styleup/diverse-knapper/utfør01_normal-united-mafia.gif"}</script></head><body><a href="sendmelding.html" name="linksend"><img onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)" src="styleup/diverse-knapper/utfør01_normal-united-mafia.gif"></a></body></html>

Link to comment
Share on other sites

Well tried to use it, but still dont work tho... Code now looks like this, dident change anything but names actually....
<html><head><script type='text/javascript'>function mouseOver(element){element.src ="styleup/diverse-knapper/utfør01_over-united-mafia.gif"}function mouseOut(element){element.src ="styleup/diverse-knapper/utfør01_normal-united-mafia.gif"}</script></head><body><a href="sendmelding.html" name="linksend"><img onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)" src="styleup/diverse-knapper/utfør01_normal-united-mafia.gif"></a></body></html>

Try removing the foreign character from the filename. Most browsers and servers won't deal with it very well. That should solve your problem. :)
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...