ครับ ต้องการ เอาค่า จาก radio button โดย ajax ครับ ต้องทำไงครับ

<script language="JavaScript" language="JavaScript">
var req;
function callme()
{
//check();
try{

if(window.XMLHttpRequest)
req= new XMLHttpRequest();
else if(window.ActiveXObject)
req= new ActiveXObject("Microsoft.XMLHTTP");
else{
alert("Browser not Support");
return false;
}

}catch(ex){
alert('Error Ajax Handler Object ???');
}
req.onreadystatechange = statechange;

var str =Math.random();
var querystr="";
querystr+="searchFinal.php?pop="+str;
querystr+="&search="+document.formSearch.search.value;
querystr+="&name="+encodeURI(document.getElementById("name").value);
// alert(encodeURI(document.getElementById("name").value));
alert(querystr);
// req.open("GET",querystr,true);
// req.send(null);
}
function statechange()
{
if(req.readyState ==4)
{

var x=document.getElementById("area");
x.innerHTML=req.responseText;
//alert(req.responseText);
}
else
{
var x=document.getElementById("area");
x.innerHTML=req.responseText;
//alert(req.responseText);
x.innerHTML="<img src=images/indicator_big.gif>Please wait.....";
}
}
</script>


<form name="formSearch" >
<div id="area">555</div>
<table width="224" height="37" border="0" cellpadding="0" cellspacing="5">
<tr>
<td width="150">
<input type="text" name="search" id="search">
</td>
<td width="59">
<input type="button" name="Submit" value="search" onclick="callme();" >
</td>
</tr>
<tr>
<td><input align= "left" type="radio" name="name" value="firstname" id="name" > First Name</td><br>
</tr>
<tr>
<td><input align= "left" type="radio" name="name" value="lastname" id="name" > Family Name</td><br>
</tr>
<tr>
<td><input align= "left" type="radio" name="name" value="email" id="name" > Email</td><br>
</tr>
<tr>
<td><input align= "left" type="radio" name="name" value="affili" id="name" > Affiliation</td><br>
</tr>
<tr>
<td><input align= "left" type="radio" name="name" value="all" id="name" > All</td><br>
</tr>
</table>
</form>
10 ก.ค. 2552 เวลา 11:43 น. 2 2,363
^