Hello SpinDoctors,
I am fairly new to prototype js framework. I love it.
Have various Ajax -get calls... which work wonderful...
Suddenly, realised that in one case I have to use ''post'' to
overcome
the limitation on URL length...
Have changed the parameters to suit to ''post'' request, but
nothing
happens... need your help...
function getOptionalGroups(key){
ur = server+''/waoptionalgroups?openagent'';
var memb = memberOfParams();
var param = {key:escape(key),memberOf:escape(memb)};
new Ajax.Request(ur,
{method:''post'',
postBody: param,
encoding: ''UTF-8'',
contentType: ''text/html'',
onCreate:function() {alert("linking");},
onSuccess: function(transport){
alert(transport.responseText);
$(''dChooseOptionalADGroups'').innerHTML =
transport.responseText;
},
onFailure: function(){alert(''Could not fetch the optional
groups'');}
}
);
}
// memberOf is Array
function memberOfParams(){
var memb = "";
if (memberOf!=undefined){
for (var i=0;i<memberOf.length;i++){
if (i>0) {
memb=memb+="&memberOf=";
}
memb=memb+memberOf[i];
}
}
return memb;
}
Similar stuff works great for ''get'' request ....
function getApplications(key){
ur = server+''/waConfigHTML?openagent'';
var memb = memberOfParams();
var param
{key:escape(key),cat:''application'',fldtag:''app'',memberOf:escape(memb)};
new Ajax.Request(ur,
{method:''get'',
parameters: param,
onSuccess: function(transport){
$(''d-application-data'').innerHTML = transport.responseText;
},
onFailure: function(){alert(''Could not fetch the application
configurations'');}
}
);
}
On checking the access logs on servers, it does not even receive a
request... so I''m thinking that the format of parameters is wrong...
or something missing in the attributes...
Thanks in advance...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---