xmlhttp.responseText and xmlhttp.readyState works fine with localhost but if i use IP address it is
        Posted  
        
            by hemant
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by hemant
        
        
        
        Published on 2009-11-12T05:16:26Z
        Indexed on 
            2010/06/11
            5:02 UTC
        
        
        Read the original article
        Hit count: 396
        
html
Hi All,
xmlhttp.responseText and xmlhttp.readyState works fine with localhost but if i use IP address it is not returning values same as localhost.
    function getFilenames()
	{				
		xmlhttp=GetXmlHttpObject();
	    if (xmlhttp==null)
	    {
	    alert ("Browser does not support HTTP Request");
	    return;
	    }
	    var url="GetFileNames.php";
	    xmlhttp.onreadystatechange=stateChanged;
	    xmlhttp.open("GET",url,true);
	    xmlhttp.send(null);
	}
	function stateChanged()
	{	
		if (xmlhttp.readyState == 4)
	    {
			StringFileName = xmlhttp.responseText; 
	    }
		else
		{
			StringFileName = null;
		}
	}
Regards Hemant
© Stack Overflow or respective owner