rhofmeyr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Feb-19 08:43 UTC
Ajax.Update nested within Ajax.Request
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
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
