function zoekwoonplaats() { var xh; if (document.getElementById("ln").value=='NED') { if (window.ActiveXObject) { xh = new ActiveXObject("Microsoft.XMLHTTP"); } else if (window.XMLHttpRequest) { xh = new XMLHttpRequest(); } var param = "pc="+document.getElementById("pc").value+"&random="+Math.random(); xh.open("GET","/php/woonplaats.php?"+param,true); xh.onreadystatechange = function() { if (xh.readyState==4) { document.getElementById("wp").value = xh.responseText; } } xh.send(null); } } function zoekadres() { var x; if (document.getElementById("ln").value=='NED') { if (window.ActiveXObject) { x = new ActiveXObject("Microsoft.XMLHTTP"); } else if (window.XMLHttpRequest) { x = new XMLHttpRequest(); } var param = "pc="+document.getElementById("pc").value+"&random="+Math.random(); x.open("GET","/php/straatnaam.php?"+param,true); x.onreadystatechange = function() { if (x.readyState==4) { xr=x.responseXML; document.getElementById("wp").value = xr.getElementsByTagName("city")[0].childNodes[0].nodeValue; document.getElementById("sn").value = xr.getElementsByTagName("street")[0].childNodes[0].nodeValue; } } x.send(null); } }