i have this ajax script
<script type="text/javascript">
var url = "GetAutoData.php?svreg="; // The server-side script
function handleHttpResponse() {
if (http.readyState == 4) {
if(http.status==200) {
var results=http.responseText;
document.getElementById('divAutoInfo').innerHTML = results;
}
}
}
function requestAutoInfo() {
var svreg = document.getElementById("getautomobile").value;
http.open("GET", url + escape(svreg), true);
http.onreadystatechange = handleHttpResponse;
http.send(null);
}
function getHTTPObject() {
var xmlhttp;
if(window.XMLHttpRequest){
xmlhttp = new XMLHttpRequest();
}
else if (window.ActiveXObject){
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
if (!xmlhttp){
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}
}
return xmlhttp;
}
var http = getHTTPObject(); // We create the HTTP Object
</script>
with this html script
Automobile #: <input type="text" id="getautomobile" value="" />
<input type="button" value="Get Automobile Info" onclick="requestAutoInfo()" />
<div id="divAutoInfo"></div>
Am trying to add a secound field "Automobile #2:<input type="text" id="getautomobile2" value="" />" to the html part and send it to mysql through the above ajax script,but am at a lost.Pls help me out...