dflow Posted April 9, 2010 Share Posted April 9, 2010 how can i force an absolute url for strURL? var strURL="include/findState2.php?CatID="+CategoryId; var req = getXMLHTTP(); function getXMLHTTP() { //fuction to return the xml http object var xmlhttp=false; try{ xmlhttp=new XMLHttpRequest(); } catch(e) { try{ xmlhttp= new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ try{ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e1){ xmlhttp=false; } } } return xmlhttp; } function getState(CategoryId) { var strURL="include/findState2.php?CatID="+CategoryId; var req = getXMLHTTP(); if (req) { req.onreadystatechange = function() { if (req.readyState == 4) { // only if "OK" if (req.status == 200) { document.getElementById('statediv').innerHTML=req.responseText; } else { } } } req.open("GET", strURL, true); req.send(null); } } function getCity(CategoryId,stateId) { var strURL="include/findCity2.php?CatID="+CategoryId+"&CountryID="+stateId; var req = getXMLHTTP(); if (req) { req.onreadystatechange = function() { if (req.readyState == 4) { // only if "OK" if (req.status == 200) { document.getElementById('citydiv').innerHTML=req.responseText; } else { alert("There was a problem while using XMLHTTP:\n" + req.statusText); } } } req.open("GET", strURL, true); req.send(null); } } Quote Link to comment https://forums.phpfreaks.com/topic/198171-absolute-url-in-getxmlhttp/ Share on other sites More sharing options...
dflow Posted April 11, 2010 Author Share Posted April 11, 2010 nobody? Quote Link to comment https://forums.phpfreaks.com/topic/198171-absolute-url-in-getxmlhttp/#findComment-1039885 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.