[thelist] javascript, input type=image and mouseovers

Katherine Spice k.spice at acu.ac.uk
Thu Dec 14 05:46:57 CST 2000


Hi James,

Thanks, that clears it up a bit (my O'Reilly DHTML book inferred it was
possible, and it's normally not wrong, so I got confused!)
<question type=rhetorical>How come I can hack perl (and enjoy myself!)
but Javascript gets me everytime?</question>
As an aside, the reason I was slow on the <NOSCRIPT> tags is 'cause NN
2.0 doesn't support them, but _does_ support scripting, and last time I
analysed the access log a small but significant percentage of users were
using NN2, so I don't use them.  Am I making life too hard for myself by
trying to be that backwards compatible? What does everybody else do?

Katherine

"Aylard JA (James)" wrote:

>         Yes, it absolutely *is* possible, provided that you are using IE 4+
> or Netscape 6. Use the onmouseover and onmouseout event handlers of the
> input element (which it has as of HTML 4, which IE 4+ and Netscape 6
> support), e.g.:
> 
> <input type="image" src="MyImage.jpg"
>    onmouseover="this.src='YourImage.jpg';"
>    onmouseout="this.src='MyImage.jpg';">
> 
> hth,
> James Aylard




More information about the thelist mailing list