Hi Elijah,

Thanks for replying and I'll use the correct group next time.

On Jun 4, 1:12 am, Elijah Insua <[email protected]> wrote:
> This question is probably better suited for the jQuery general list, as this
> one is for
> the development of jQuery.  That list can be found 
> here:http://groups.google.com/group/jquery-en
>
> To answer your question, $.get is asynchronous which means the event will
> never be properly canceled
> as your click handler will return before the request is fulfilled.
>
> A solution to this problem would be to always cancel the event, and provide
> a means for submitting the
> form manually.
>
> something like:http://pastie.org/499201should work
>
> Hope it helps,
>
> -- Elijah
>
> On Wed, Jun 3, 2009 at 12:32 AM, Jules <[email protected]> wrote:
>
> > I am working with asp.net.  Before the page is submitted to the
> > server, an ajax validation is called to confirm the update.  The user
> > is allowed to cancel the save using client side confirm().  If the
> > user back out, I want to prevent the submit by calling preventDefault
> > ().  However, jquery returns error "Member not found".  Any Idea?
>
> > Here is the code:
>
> >    <script type="text/javascript">
> >        $(document).ready(function() {
> >            $("#Button1").click(function(e) {
>
> >                $.get("GetConfirmation.aspx", { param1: "test",
> > param2: "data" },
> >                            function(result) {
>
> >                                if (!confirm('Do you want to
> > continue?'))
> >                                    e.preventDefault();
> >                            }
> >                            , "text");
> >            });
> >    </script>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to