JavaScript Mini-FAQ Sooner, or later, as we start learning and using JavaScript, we will all have questions we want answered. One author, Danny Goodman, has compiled a list of typical questions people ask when starting out with JavaScript.
| Name: |
Richard |
| Subject: |
Re: Submit Form Rollover Image |
| Date: |
08-20-1999 09:33AM |
I had to write a seperate image swap routine to get it to work for me - and only in IE :-( I't won't break Netscape though :-)
function changeButtonPic(cmdButton, src) {
//This is used in the rollover events to change one image to another on form buttons
cmdButton.src = /old?u=http%3A%2F%2Fwww.devshed.com%2FClient_Side%2FJavaScript%2FMini_FAQ%2Fcomments.html%2Fc1157%2Fsrc&y=1999
}
and is called with:
input type="image" src="/old?u=http%3A%2F%2Fwww.devshed.com%2FClient_Side%2FJavaScript%2FMini_FAQ%2Fcomments.html%2Fimages%2Fbtn_submit_up.gif&y=1999" name="Submit" border="0" align="top" onMouseOver="changeButtonPic(this, '../images/btn_submit_ov.gif')" onMouseDown="changeButtonPic(this, '../images/btn_submit_dn.gif')" onMouseOut="changeButtonPic(this, '../images/btn_submit_up.gif')"
BTW the above smippet should have gone inside the usual tag chars (less-than, greater-than) but I couldn't work out how to do it :-/
|
Other posts in this thread:
Reply to this post:
|
 |
Visit the JavaScript Forum!
New On DevShed:
Hot Forum Topics:
|