Click to See Complete Forum and Search --> : Event (on)change issue


Ipsens
March 31st, 2009, 03:35 PM
I am using prototype's framework.
I wish to fire it upon changed value in, eg: select element, if option changes.

Event.observe(document.body, 'change', function(event) {
alert('I AM EVENT');
});
Doesn't work in IE7, but does in all other browsers.
Why?

PeejAvery
March 31st, 2009, 05:04 PM
I'm not exactly sure as to why that won't work. I have had trouble in the past with document.body. Have you tried document.getElementsByTagName('body')[0] instead?

Ipsens
March 31st, 2009, 05:48 PM
Well, that doesn't work in IE7 as well

PeejAvery
March 31st, 2009, 06:03 PM
I would suggest you contact prototype then. It could be a bug.

Ipsens
March 31st, 2009, 06:08 PM
Ok, I will.