Damn IE JS event behaviour

I’ve written some application in Rails, using prototype/scriptaculous javascript library. It works great in FF, but in IE it has some fails…

I’ve had following code:


<%= check_box "adsl_cpe_chk", "yes", {:onChange => "if (this.checked) { Element.show('adsl_cpe');} else { Element.hide('adsl_cpe');}"} %>
  
  

and if I clicked (set) checkbox, the select field was still hidden – until I clicked somewhere else – with IE only. I’ve discovered, if I replace onChange with onClick, it works ok. A few hours of trying everything are gone :(