below my java Script is there
it is not entering after if(xmlObj.readystate == 4 & xmlObj.status == 200)
please help me..,
Code: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; } var xmlObj = GetXmlHttpObject(); function getCityData() { var stateValue = document.getElementById("State").value; url = "http://localhost:8085/NewForm/getCity.jsp?State="+stateValue; alert(url); xmlObj.open("GET",url,true); xmlObj.onreadystatechange = function() { //alert(xmlObj.status); //alert(xmlObj.readystate); alert(xmlObj); if(xmlObj.readystate == 4 & xmlObj.status == 200) { alert(xmlObj.readystate); alert("jerald"); alert(xmlObj.responseText); //var id = document.getElementById("City"); var result = xmlObj.responseText; alert(result); var s = result.split(','); var indx = 1; for(indx=1; indx < s.length; indx++) { document.form1.City.options[s[indx]] = new Option(s[2],s[1]); } } } xmlObj.send(null); }


Reply With Quote

Bookmarks