Hey guys, Thanks for the advice. I made the suggested changes, but now I've got a new problem - everything works fine in the good browsers, but, as usual, doesn't work correctly in IE8. The difference is that in IE8, instead of the output of the script replacing the contents of a div, the script output replaces the entire page. IE8 works fine when the listener is set directly on the form. Code for both situations is below. Any advice? God I hate microsoft.
Thanks in advance. ______________ IE 8 chokes. The sayThanks div is loaded along with the form in an ajax load _____________________ function initContactListener() { $('centercontent').observe('submit', function(evt) { // will need switch logic if another form added to the center content area form = evt.findElement(); $('sayThanks').update('<div style="text-align:center"><img src="images/ajax-loader.gif"></div>'); evt.stop(); new Ajax.Updater('sayThanks', form.action, {parameters: form.serialize()}); }); } document.observe('dom:loaded', function() { initContactListener(); /* removed unrelated code */ }); ________________ IE8 is ok - script is eval'd by prototype during an ajax load of the form page __________________________ <script type="text/javascript"> var formelement = $('contactForm'); var sub = formelement.findFirstElement(); sub.focus() formelement.observe('submit', function(evt) { $('sayThanks').update('<div style="text-align:center"><img src="images/ajax-loader.gif"></div>'); evt.stop(); new Ajax.Updater('sayThanks', this.action, {parameters: this.serialize()}); }); </script> -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.