[jQuery] Re: Bind event that should be executed first

2007-10-18 Thread Jörn Zaefferer
Fabien Meghazi schrieb: When using validator.form() the error messages are shown but the first error input is not focussed. Is this the normal behaviour ? If yes, is there a method I can call for validator so it will focus the first error field in case validate fails ? Just call validator.fo

[jQuery] Re: Bind event that should be executed first

2007-10-17 Thread Fabien Meghazi
> >if (v.form()) // runs form validation and returns true if successful > >// you have to dig into the validation source > > to figure this out > > [...] > Granted, documentation still needs a lot of work, but the method is > documented here: > http://jquery.bassistance

[jQuery] Re: Bind event that should be executed first

2007-10-04 Thread Jörn Zaefferer
Fabien Meghazi schrieb: Do you bind submit buttons onclick or form's onsubmit for validation ? The submit event. You can submit a form by pressing enter without any submit button. -- Jörn

[jQuery] Re: Bind event that should be executed first

2007-10-04 Thread Fabien Meghazi
> After much googling, I found this, which states that the firing order of > multiple event handlers bound to the same event is arbitrary: Mhh I see. But all event binded functions to a form submit via jquery are stored somewhere right ? If I could get those functions, then unbind the submit eve

[jQuery] Re: Bind event that should be executed first

2007-10-03 Thread Josh Nathanson
t the firing order of multiple event handlers bound to the same event is arbitrary: http://tinyurl.com/3c7nso -- Josh - Original Message - From: "Fabien Meghazi" <[EMAIL PROTECTED]> To: Sent: Wednesday, October 03, 2007 2:47 PM Subject: [jQuery] Re: Bind event th

[jQuery] Re: Bind event that should be executed first

2007-10-03 Thread Josh Nathanson
ober 03, 2007 2:43 PM Subject: [jQuery] Re: Bind event that should be executed first Josh Nathanson schrieb: [...] if (v.form()) // runs form validation and returns true if successful // you have to dig into the validation source to figure this out [...] Granted

[jQuery] Re: Bind event that should be executed first

2007-10-03 Thread Fabien Meghazi
> $("#myform").submit(function() { > // do your textarea thing here > var v = $(this).validate(validateoptionshere); Do you know where javascript events are stored ? In elements dom or somewhere ? If yes I would be able to keep them apart, unbind and rebind with my stuff then the old bind

[jQuery] Re: Bind event that should be executed first

2007-10-03 Thread Fabien Meghazi
> $("#myform").submit(function() { > // do your textarea thing here > var v = $(this).validate(validateoptionshere); In fact my stuff is a plugin for fck editor so I want it to to be unobstrusive. -- Fabien Meghazi Website: http://www.amigrave.com Email: [EMAIL PROTECTED] IM: [EMAIL PR

[jQuery] Re: Bind event that should be executed first

2007-10-03 Thread Jörn Zaefferer
Josh Nathanson schrieb: [...] if (v.form()) // runs form validation and returns true if successful // you have to dig into the validation source to figure this out [...] Granted, documentation still needs a lot of work, but the method is documented here: http://jque

[jQuery] Re: Bind event that should be executed first

2007-10-03 Thread Josh Nathanson
sh - Original Message - From: "Fabien Meghazi" <[EMAIL PROTECTED]> To: Sent: Wednesday, October 03, 2007 2:22 PM Subject: [jQuery] Re: Bind event that should be executed first One way to go about it is to put all your submit functions within a sort of "master

[jQuery] Re: Bind event that should be executed first

2007-10-03 Thread Fabien Meghazi
> One way to go about it is to put all your submit functions within a sort of > "master function," that will be the only function bound to the submit event. > Then you can guarantee the order of execution. Like so: In fact I don't have the hand of the possible previous bindings so I can't bundle

[jQuery] Re: Bind event that should be executed first

2007-10-03 Thread Josh Nathanson
One way to go about it is to put all your submit functions within a sort of "master function," that will be the only function bound to the submit event. Then you can guarantee the order of execution. Like so: $("#myform").bind("submit", masterfunction); masterfunction = function() { dofu