Ah, I see. You will probably have to trigger the validation and form
plugins in a different way. You can do something like this.
Rather than bind the validation plugin in the standard way, you can do this:
$("#myform").submit(function() {
// do your textarea thing here
var v = $(this).validate(validateoptionshere);
if (v.form()) // runs form validation and returns true if successful
// you have to dig into the validation source to
figure this out
$.ajaxSubmit();
else
alert('Error on form validation!')
});
-- Josh
----- Original Message -----
From: "Fabien Meghazi" <[EMAIL PROTECTED]>
To: <jquery-en@googlegroups.com>
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 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 them into a master function.
My case is that I use Mike's form plugin with Jörn's validation plugin.
The thing is that when user's click on a button (after initialization
of both others plugin), a dhtml editor is replacing a textarea and I
have to bind the form submit in order to restore the correct value of
the textarea before other plugin's submit bindings are triggered.
Is there a solution for that ? Even if it's pure javascript outside
jQuery's api.
--
Fabien Meghazi
Website: http://www.amigrave.com
Email: [EMAIL PROTECTED]
IM: [EMAIL PROTECTED]