function collegemasterURL(url) { if (typeof XMLHttpRequest != "undefined"){ xmlHttp= new XMLHttpRequest(); } else if (window.ActiveXObject){ xmlHttp= new ActiveXObject("Microsoft.XMLHTTP"); } if (xmlHttp==null){ alert("Browser does not support XMLHTTP Request") ; return; } xmlHttp.onreadystatechange = processStateChange; xmlHttp.open("GET", url, true); xmlHttp.send(null); function processStateChange() { if (req.readyState == 4) { // Complete if (req.status == 200) { // OK response var returnElements = req.responseText.split("||"); //Process each of the elements for ( var i = 0; i < returnElements.length; i++) { if (returnElements[i] != "") { valueLabelPair = returnElements[i].split(";"); //alert(valueLabelPair[1]+''+ valueLabelPair[0]); document.getElementById('cntID').options.length = returnElements.length; document.getElementById('cntID').options[i] = new Option( valueLabelPair[1], valueLabelPair[0]); } } } else { alert("Problem: " + req.statusText); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)