หน้าที่ 1
<script>
var req;
function check(){
if(window.XMLHttpRequest)
{
req = new XMLHttpRequest();
}
else if(window.ActiveXobject)
{
req = new ActiveXObject("Mocrosoft.XMLHTTP");
}
else
{alert('Browser not support');
return false;
}
var txtUsername1=document.myForm.txtUsername.value;
var pw1=document.myForm.pw.value;
var name1=document.myForm.name.value;
if(document.myForm.rd1.checked==true){
var sex1="ชาย";}else{sex1="";}
if(document.myForm.rd2.checked==true){
var sex2="หญิง";}else{sex2="";}
var new_Date1=document.myForm.new_Date.value;
var new_Month1=document.myForm.new_Month.value;
var new_Years1=document.myForm.new_Years.value;
var phone1=document.myForm.phone.value;
var txtAge1=document.myForm.txtAge.value;
var occupation1=document.myForm.occupation.value;
var status1=document.myForm.status.value;
var province1=document.myForm.province.value;
var amphur1=document.myForm.amphur.value;
var district1=document.myForm.district.value;
var id_province1=document.myForm.id_province.value;
var str=Math.random();
var querystr="chk_user_ajax.php?pop="+str+"&txtUsername="+txtUsername1+"&pw="+pw1+"&name="+name1+"&sex="+sex1+sex2+"&new_Date="+new_Date1;
var querystr1=querystr+"&new_Month="+new_Month1+"&new_Years="+new_Years1+"&phone="+phone1+"&txtAge="+txtAge1+"&occupation="+occupation1+"&status="+status1+"&province="+province1+"&hur="+amphur1+"&district="+district1+"&id_province="+id_province1;
req.open("GET",querystr1,true);
req.send(null);
req.onreadystatechange=function(){
if(req.readyState==4)
{
document.getElementById('pan1').innerHTML=req.responseText;
}
else
{
document.getElementById('pan1').innerHTML="<img src=image/indicator>";
}
}
}
function hidden(){
document.getElementById('pan2').style.display='none';
}
</script>