how to specify url of ajax.
I have given full path still it is not working.......
Php page is in different directory ...............
I have created a plugins directory.
in that i have created a ajax_table_load.php
and i am sending request to that php page from from another directory. which is outside of that plugins directory.
I think problem is with url variable that i have declared below.
I want to specify a complete path .
please guide me.......................
Code:<script> var xmlHttp; function quit() { xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { alert ("Browser does not support HTTP Request"); return; } var url="http://"+document.domain+"/plugins/ajax_table_load.php"; xmlHttp.onreadystatechange=stateChanged; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function GetXmlHttpObject() { var xmlHttp=null; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { //Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { alert(xmlHttp.responseText); //document.getElementById(divStr).innerHTML=xmlHttp.responseText; //alert(document.getElementById(divStr).innerHTML); } } </script>



Reply With Quote
Bookmarks