function change_city(area_id){document.getElementById('city_loader').style.display='block';var xmlhttp; if (window.XMLHttpRequest){ // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest();}else{ // code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}xmlhttp.onreadystatechange = function(){ if (xmlhttp.readyState==4 && xmlhttp.status==200) { var result = xmlhttp.responseText; if (result) document.getElementById('city_loader').style.display='none'; document.getElementById('error_log').innerHTML='PROBLAM!'; }}xmlhttp.open("GET","pages/update/change_city_by_area.php?area_id="+encodeURIComponent(area_id),true);xmlhttp.send(null);}
This is the function that call with "onclick" event. My problam is how to include the array that I'm returned from "change_city_by_area.php", inside the other SELECT TAG(city). I use this ajax code for a lot of things but i never used it to get response with array.