Hi,
Javascript file
the file ab.php returns an array to the javascript file, how can i pass this array 'y' to the php cd.php file
Code:
<? #cd.php echo "<input type='text' name='text1' id='text1' onchange=\"return_value()"\ /><br></br>"; ?>
Code:
var xmlHttp; function return_value() { var x=document.getElementById('text1').value; xmlHttp = GetXmlHttpObject(); if(xmlHttp == null) { alert("Your browser does not support ajax"); return; } var url="ab.php"; url=url+"?x="+x; xmlHttp.open("GET",url,true); xmlHttp.send(null); xmlHttp.onreadystatechange = StateChanged; function StateChanged() { if(xmlHttp.readyState == 4) { var y=new Array(); y= xmlHttp.responseText; } }
Comment