var xmlhttp = null; function xmlhttpHandler(url) { // code for Mozilla, etc. if (window.XMLHttpRequest != null) { xmlhttp=new XMLHttpRequest(); if(xmlhttp.overrideMimeType){ xmlhttp.overrideMimeType('text/xml'); } xmlhttp.onreadystatechange = function() { // if xmlhttp shows "loaded" if (xmlhttp.readyState==4) { // if "OK" if (xmlhttp.status==200) { xmlhttpResponse(xmlhttp.responseXML); } else { alert("Problem retrieving XML data"); } } } var b = url.split("?"); xmlhttp.open("POST",b[0],true); if (b.length > 1 ) { //Send the proper header information along with the request xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-Length", b[1].length); //xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.send(b[1]); } else { xmlhttp.send(null); } } // code for IE else if (window.ActiveXObject) { xmlhttp= new ActiveXObject("Microsoft.XMLHTTP"); if (xmlhttp) { xmlhttp.onreadystatechange = function() { // if xmlhttp shows "loaded" if (xmlhttp.readyState==4) { // if "OK" if (xmlhttp.status==200) { xmlhttpResponse(xmlhttp.responseXML); } else { alert("Problem retrieving XML data"); } } } xmlhttp.open("POST",url,true); xmlhttp.send(); } else { alert("Browser doesn't support XMLHTTP protocol"); } } } function getFormNum (formName) { var formNum =-1; for (i=0;i=0) { merk = document.forms[formNum].f_merk.options[j].value; url = '/owa_dima/owa/modellen_partner.xml?p_merk=' + merk + '&p_code=MSN'; xmlhttpHandler(url); } } catch (e) { if (e instanceof TypeError) { //vang type errors op } } } function xmlhttpResponse(dom) { try { var poplist = document.occasion.f_model; var pmodel = document.occasion.p_model; var poplist_value = dom.getElementsByTagName('MODEL'); with (poplist) { for(i=options.length-1;i>0;i--) { options[i] = null; } // altijd een default option options[0] = new Option('alle modellen',''); // vul de poplist for (var i=0; i