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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript & Images 1

Status
Not open for further replies.

bkhendershot

Programmer
Apr 28, 2003
5
US
I'm still somewhat new to javascript, I've created image rollovers, but I'm trying to figure out if there's a way to create an image rollover in a form. I have <input type='image' and I'd like to be able to use the same onMouseOver and onMouseOut effects that you can use with normal images (document.IMAGENAME.src), but I can't find a way to access the image in a form. Is there a way, or am I trying to do the impossible? I have some ideas on how to make it work if I can't use the mouseover techniques, but that would be my preferred choice. Can anyone shed any light on this? Thanks!
 
Code:
document.FormName.ImageName.scr=...

Known is handfull, Unknown is worldfull
 
*sigh* The one combination I think I forgot! Thanks a lot, I appreciate it! :)
 
and hey if u want to refer an image irrespective of whether in a form or not use this:

document.getElelementsByName(&quot;ImageName&quot;).src=...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top