(window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { alert(xmlhttp.responseText); //This is showing Result as HTML PAGE var response = eval('(' + xmlhttp.responseText + ')'); var status = " "; if (response.Data.length != 0) { for (var i = 0; i < response.Data.length; i++) { for (var value in response.Data[i]) { status = status + "<option value=" + response.Data[i][value] + ">" + response.Data[i][value] + "</option>"; } } } else { } $("#ddItem").html(status); $("select#ddItem").selectmenu("refresh"); } else if (xmlhttp.status != 200) { navigator.notification.alert("Coudn't connect to the server,Please check your internet settings or contact system administrator!", null, 'Connection Failed', 'OK'); } } var key = window.localStorage.getItem("userkey"); var clientid = window.localStorage.getItem("clientid"); var url = clientid + "/GetInventory"; xmlhttp.open("POST", url, true); xmlhttp.timeout = 10000; xmlhttp.ontimeout = function () { $.mobile.loading("hide"); navigator.notification.alert("Coudn't connect to the server,Please check your internet settings or contact system administrator!", null, 'Timed Out', 'OK'); } xmlhttp.send("key=" + key);
responseXML
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)