im not good in English, so code here ----------------------------------------------------------------------------------------------------- <form id="form"> <input type="submit" value="submit" /> </form> <script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/ prototype.js"></script> <script> //i pass the submit event with custom event $('form').observe('submit', function(e){ $('form').fire('custom:readySubmit', {submitEvent: e}) }) //i expect the submit event will be stop $('form').observe('custom:readySubmit', function(e){ e.memo.submitEvent.stop(); }) </script> ----------------------------------------------------------------------------------------------------- Firefox show as i expect, but IE7 doesn't im not sure what's the reason or it is a bug. so someone can give me a help?
on 2008-06-18 03:51
on 2008-06-18 15:59
What is it that you expect, that IE isn't doing? My guess is that you want the custom observer for readySubmit to stop the submit event. But since the .fire() happens asynchronously (someone correct me if I'm wrong here?), the form will submit right away and the custom handler won't even be called. Or at the very least, you're getting into a very unpredictable timing scenario. You should really stop the original submit event in the original handler, or in an ordinary function call that's guaranteed to be synchronous. -Fred On Tue, Jun 17, 2008 at 8:51 PM, ç»è·¯ <aeoluszzf@gmail.com> wrote: > "></script> > }) > > > </script> > > ----------------------------------------------------------------------------------------------------- > Firefox show as i expect, but IE7 doesn't > im not sure what's the reason or it is a bug. > so someone can give me a help? -- Science answers questions; philosophy questions answers.