Hi everyone,
I have a script below that submits a form using Ajax.Request which is
working fine. onComplete or onSuccess though, I'd like it to refresh
the div form (formCapture), but so far I can't get it to work. The
script runs to into the onComplete stage, but the div isn't refreshed.
Can anyone help with this?
Regards,
Robert Hofmeyr
function subForm() {
new Ajax.Request('captureall_action.php', {
method: 'post',
parameters: Form.serialize('formCapture'),
onComplete: function(transport){
//var response = transport.responseText || "no response
text";
//alert("Success! \n\n" + response);
var url = 'tempCaptureData.php?projectID=<?=$_GET['projectID']?
>&docID=<?=$_GET['docID']?>';
var div = document.formCapture;
//alert(div.innerHTML);
var myAjax = new Ajax.Updater(div, url,
{method:'get',parameters:pars});
alert(myAjax);
},
onFailure: function(){ alert('Something went wrong...') },
});
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---