[jQuery] jqmodal and jquery ajax request on the same page problem

2008-07-11 Thread Kassan

Hi,

I use jqmodal window with with ajax content + ajaxText for 'waiting'
html, and a dynamic div with form submit:

function finishAjax(id, response) {
$('#'+id).html(unescape(response));
$('#'+id).fadeIn();
}

function SendcForm(){
$('#contactform').ajaxStart(function() {
 $(this).html("wait...");
 });
   $.post("/ajax/cform", { email: $('#email').val(), message: $
('#message').val()},
function(response){
$('#contactform').fadeOut();
   setTimeout("finishAjax('contactform', '"+escape(response)+"')",
400);
 });
return false;
}

When I click to view jqmodal window, my 'contactform' div is updated
with ajax "waiting" message. How can I make this two independent?


[jQuery] jqmodal and jquery ajax request on the same page

2008-07-11 Thread Kassan

I have one jqmodal window with ajax source (and ajaxText 'waiting'
message), and one div with form- with ajax onSubmit.

When I click on a link to show my modal window, my dynamic div is also
updated with its own ajax-'waiting' message. How can I make this two
independent? Below is my script for form submitting:

function finishAjax(id, response) {
$('#'+id).html(unescape(response));
$('#'+id).fadeIn();
}

function SendcForm(){
$('#contactform').ajaxStart(function() {
 $(this).html("waiting html");
 });
   $.post("/ajax/cform", { email: $('#email').val(), message: $
('#message').val()},
function(response){
$('#contactform').fadeOut();
   setTimeout("finishAjax('contactform', '"+escape(response)+"')",
400);
 });
return false;
}

Thanks.