Link to home
Start Free TrialLog in
Avatar of MnInShdw
MnInShdwFlag for Japan

asked on

setAttribute in Firefox

The following script works perfectly in Internet explorer.
but it does nothing in FireFox. How can I modify it work
in FireFox too.

thanks for your help
--------------------------------------------------------------------------------
<style>
.imgCls {border: none;}
.imgClsClick {border: 1px solid black;}
</style>
<img src="japnuma.png" onmousedown="setAttribute('className', 'imgClsClick');" onmouseup="setAttribute('className', 'imgCls');" />
ASKER CERTIFIED SOLUTION
Avatar of b0lsc0tt
b0lsc0tt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DireOrbAnt
DireOrbAnt

As an FYI, this works in FF:
<img src="japnuma.png" onmousedown="setAttribute('class', 'imgClsClick');" onmouseup="setAttribute('class', 'imgCls');" />

But will not work in IE :)

So use b0lsc0tt's version :)
Avatar of MnInShdw

ASKER

Million thanks for your quick help
Your welcome!  I'm glad that I could help.  Thank you for the grade, the points and the fun question.

bol