[jQuery] Re: calling a function before a form is submitted

2008-06-16 Thread Mike Alsup
> I am having the same issue as Francesco. Can anyone verify that > $('form').bind('submit', fn); and $('form').submit(fn); > are actually different They are the same. However, if you invoke submit() with no args then you do not bind a listener, but instead trigger the event.

[jQuery] Re: calling a function before a form is submitted

2008-04-28 Thread gregarious
Hi, > with your code above you trigger the submit event, but what you want > is to listen to it.. > > so you should use > > $("form").bind("submit", ); is there really a difference between $('form').bind('submit', fn); and $('form').submit(fn); The way I understood so far they should behave

[jQuery] Re: calling a function before a form is submitted

2008-04-28 Thread markus.staab
with your code above you trigger the submit event, but what you want is to listen to it.. so you should use $("form").bind("submit", ); see http://docs.jquery.com/Events/bind#typedatafn On 28 Apr., 09:16, gregarious <[EMAIL PROTECTED]> wrote: > Hi Mike, > > thanks for your help. I just mana

[jQuery] Re: calling a function before a form is submitted

2008-04-28 Thread gregarious
Hi Mike, thanks for your help. I just managed to put online a page demonstrating the problem. Here: www.sebsib.com/map/false I'm using "return false;" and you can see that when I press the "save" button the marker moves to the address indicated but the form, of course, is not submitted. Here: w

[jQuery] Re: calling a function before a form is submitted

2008-04-27 Thread Michael Geary
Francesco, As you know, JavaScript executes statements sequentially one after another, so it isn't generally possible for one line of code to affect another line of code that's already been executed. There are two exceptions that I'm aware of: 1) A syntax error will prevent *any* of your code f