The easiest way to handle this is to define a function that does what
you need and then call that function when appropriate.  For example:

function bindForm() {
   var opts = {
       // form options here
       target: '#myTarget',
       success: bindForm  // rebind form on success
   };
   $('#myForm').ajaxForm(opts);
}

$(document).ready(function() {
   bindForm();
   // other stuff
});

Mike

Hello. (excuse me for my bad english ^^)

I started using jQuery a few days ago and it looks pretty powerful :) I then
discovered the form plugin and it's doing exactly what i was looking for.

But i have an issue with a feature i would like to create. I would like to
submit a pretty heavy form using ajax; why? well actually, when i submit
this form, i have to wait at least 30 seconds to get the data processing
done. What i want to do is to submit the form in ajax, then load this same
form with the next entries i have to work with (while the processing of the
previous entries is still in progress). This way, i can work with my data
and submit this new form when the processing of my previous form is done
(and so on).

This feature is actually working but my problem is that the ajax submitting
is only working for the first process. As I understand it, the new form i
added using ajax and innerHTML cannot be found by jQuery since the HTML i
added is not available for the DOM methods.

Is there a way to make my new form available for jQuery and the Form plugin?
It's the exact same form (same name, same id). Somekind of ... jQuery reload
... or something.

Thanks for the help and the good work ;)
--
View this message in context: 
http://www.nabble.com/jQuery-and-forms-created-using-ajax-%28Form-plugin%29-tf3658340s15494.html#a10221393
Sent from the JQuery mailing list archive at Nabble.com.


Reply via email to