ช่วยด้วยคร่า...งง is null or not an object

function edit_data()
{
 var PolicyType_=document.getElementById("s_a");
 var PolicyType=PolicyType_.options[PolicyType_.selectedIndex];

   var PlanNameId_edit=document.form_show.PlanNameId_edit.value;
   var PlanName_edit=document.form_show.PlanName_edit.value;
 

 var req;
 if (window.XMLHttpRequest)
  req=new XMLHttpRequest();
 else if (window.ActiveXObject)
  req=new ActiveXObject("Microsoft.XMLHTTP");
 else{
  alert("Browser not support");
  return false;
 }
 req.onreadystatechange = function()
 {
  if (req.readyState==4) {
   alert("บันทึกข้อมูลเรียบร้อยแล้วค่ะ");
   do_selectchange(PolicyType_);
  }
    document.getElementById("progress_policy").innerHTML="<img src=../pic/pro.gif>";
 }

   var str=Math.random();
   var querystr="";
   if(PolicyType.selected){PolicyType=PolicyType.value;} else {PolicyType='';}
   

    querystr+="planname_db.php?pop="+str;
   querystr+="&PolicyType="+PolicyType;
   querystr+="&PlanName_edit="+PlanName_edit;
   querystr+="&PlanNameId_edit="+PlanNameId_edit;
   //querystr+="&showType="+value;
   querystr+="&db="+'update';
   alert(querystr);
   req.open("GET",  querystr  ,true);
   req.send(null);
 
}




<form name="form_show" id="form_show">
 <td width="364" bgcolor="#F0F0F0" id="<?=$PlanNameId?>" style="display:none;" name="my_row2">
 <input name="PlanName_edit" type="text" id="PlanName_edit"value="<?=$PlanName?>"  size="40" />
 <input name="PlanNameId_edit"   type="text" id="PlanNameId_edit" value="<?=$PlanNameId?>">
 <input name="db" id="db"  type="text" value="update">
 <input name="PolicyType" id="PolicyType"  type="text" value="<?=$PolicyType?>">
 <input type="button" name="Button" value="บันทึก" onClick="edit_data();">
 <div id="progress"></div>
 </td>
  </form>


พอเรากดบันทึกแล้วมันก็ error ว่า 'document.form_show.PlanNameId_edit.value' is null or not an object

งง จริงๆ ค่ะ ทำมาสองวันแล้ว ไม่ได้เลย
29 ก.ย. 2552 เวลา 11:20 น. 8 2,574
^