Hi,
Ive been playing around with a jQuery Form Plugin.

It all works fine, though, i was wondering, is it possible to add content to
a div the moment you 'submit' the form?

This is basically all i use at the moment to output "search results" in the
searchContainer div.

$(document).ready(function() { 

        $('#formQuerySearch').ajaxForm(function(data) { 
        
                $("#searchContainer").html(data);
        }); 
});


Now what I actually want to have is a "loader" gif animation to be shown in
another div at the moment the user submits the form. And then when the
search is finished, make that .gif animation go away again.

This could be easily done by just saying:
 #('$process_data').html(" imgloader.gif  Searching...");
and then on finish:
#('$process_data').html("");

Getting rid of the loader is easy, i'd just add #('$process_data').html("");
below $("#searchContainer").html(data);.

But how do I actually get the "Searching..." animated gif to show on submit?


Regards,
Michael
-- 
View this message in context: 
http://www.nabble.com/Form-Plugin-Initialize--tp18587474s27240p18587474.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to