[thelist] Trouble setting onClick dynamically in IE and FireFox

Matt Warden mwarden at gmail.com
Thu Apr 13 00:09:45 CDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Howdy Chris,

Chris Dorer wrote:
>             e[i].onclick = "alert( 'Hey you!' ); return false;";

e[i].onclick = function() { alert('Hey you!'); return false;};

Works in firefox. You might need to mess with these:

http://www.w3.org/TR/2001/WD-DOM-Level-3-Events-20010823/events.html#Events-flow-capture
(preventDefault() and stopPropagation())

hth,

- --
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEPd0ZrI3LObhzHRMRAgSiAJ9DoMY2sM/ndwF9NvtDoonvuAclxQCdH71u
S9LoyBCMUXtDrKAC6mSdWEQ=
=4I3C
-----END PGP SIGNATURE-----



More information about the thelist mailing list