Dear all, I'm trying to set event handler attributes when the DOM is ready, but it doesn't work on IE7.
The snippets are as such: <script type="text/javascript"> var onInputChange = function (){ alert("Hey I'm changed"); } $(function() { $(".input").attr("onchange", "onInputChange();"); }); </script> <input type="text" class="input" /> Now I tried this on FF3 and I can see in Firebug that jQuery successfully adds the onchange attributes to the input text. But this does not work on IE7. Though it is interesting that if I add other attributes like "value" to the textinput it works. Is this the problem with IE7? Has anyone experienced this before? Thank you very much in advance. -- If you can't believe in God the chances are your God is too small. Read my blog: http://joshuajava.wordpress.com/ Follow us on twitter: http://twitter.com/scrum8