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, 绝路 <[EMAIL PROTECTED]> wrote:

>
> 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<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?


-- 
Science answers questions; philosophy questions answers.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to