Hi everyone,

I am a bit confused as to why this error is happening, but i will try to explain it as best i can, if i don't explain it well enough let me know and i will go over it again in more detail.

i am returning a value either numeric or a string from a db, something like this:
Code:
echo $retvalue;
and the js i am using is this:
Code:
var xmlhttp;
function retvalfrmdb()
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  }
var url="retvaluefromdb.php";
url=url+"?sid="+Math.random();
xmlhttp.onreadystatechange=stateChange;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function stateChangee()
{
if (xmlhttp.readyState==4)
{
//
if(xmlhttp.responseText == 1)
{
	
	showProperty(resp,aid);
}else{
$(".someid").prepend(xmlhttp.responseText+"<br />");

}


}
}
The problem is that when i go ahead and try and use the xmlhttp.responseText to compare it, it adds a space at the end of everything either a number or a string. Wierdest error i have ever seen, my host uses php5.2.x i am unsure if that is the problem or not, any help with this would be great.