Hello,
I am using the following JAVAX stuff:
The problem arises when the cvalue parameter is a special character like "%" or "#" => I get a http_request.status =500
How can I solve this problem?
Thank you
I am using the following JAVAX stuff:
Code:
....
[COLOR=red][plist="cname="+fieldName+"&cvalue="+cvalue;
[b]url="update_field.jsp?"+plist;[/b]
makeRequest(url);[/color]
}
function makeRequest(url)
{
http_request = false;
if (window.XMLHttpRequest) // Mozilla, Safari,...
{
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType)
{
http_request.overrideMimeType('text/xml');
}
}
else
{
if (window.ActiveXObject) // IE
{ try
{
http_request = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
http_request = new ActiveXObject
} catch (e) {}
}
}
}
if (!http_request)
{
alert('Giving up. Cannot connect');
return false;
}
http_request.onreadystatechange = alertContents;
http_request.open('GET', url, true);
http_request.send(null);
}
function alertContents()
{
if (http_request.readyState == 4) // COMPLETE
{
if (http_request.status == 200)
{
var values = http_request.responseText;
var ier=trim(values);
if (ier != "0")
{
alert(ier);
}
}
else
{
alert("Problem with the request.\nTry it again.\nIf the problem persists,
consult the database administrator");
}
}
}
The problem arises when the cvalue parameter is a special character like "%" or "#" => I get a http_request.status =500
How can I solve this problem?
Thank you