Problem with function getRequestBody
function getRequestBody(oForm) {
//array to hold the params
var aParams = new Array();
//get your reference to the form
var oForm = document.forms[0];
//iterate over each element in the form
For (var i=0 ; i < oForm.elements.length; i++) {
//get reference to the field
var oField = oForm.elements[i];
//different behavior based on the type of field
switch (oField.type) {
case "text":
case "hidden":
case "password":
aParams.push(encodeNameAndValue(oField.name, oField.value));
break;
}
etc..
Well the offending line is as follows
aParams.push(encodeNameAndValue(oField.name, oField.value))
do not recognize the oField.name...
to return the call the string does not contain the names of parameters, but only the values for example
=daniel&=moon
missing name: user=daniele&psw=moon
Thanks
|