|
|
|
ต้องการทำ popup ส่งข้อมูลไปหน้าหลัก ที่เป็น checkbok และ textbox ค่ะ |
|
|
|
|
|
|
|
คือใช้ javascript เป็น popup ที่ดึงมาจากฐานข้อมูลแล้วส่งข้อมูลไปหน้าหลัก ถ้าเป็น text box จะโชว์ปกติ แต่ checkbox ไม่โชว์ค่ะ
Code (PHP)
<script language="javascript">
function selData(intLine,plan_no,plan_delivery,supp_name,supp_code,rm_code,rm_name,trans_name,type_code,type_name,pack_code,pack_name,unit,pack_weight,car,pk_weight,weight,diff,name,deduct,wage_code,po_ref)
{
var splan_no = self.opener.document.getElementById("txtplan_no");
splan_no.value = plan_no;
var splan_delivery = self.opener.document.getElementById("txtplan_delivery");
splan_delivery.value = plan_delivery;
var ssupp_code = self.opener.document.getElementById("txtsupp_code");
ssupp_code.value = supp_code;
var ssupp_name = self.opener.document.getElementById("txtsupp_name");
ssupp_name.value = supp_name;
var srm_code = self.opener.document.getElementById("txtrm_code");
srm_code.value = rm_code;
var srm_name = self.opener.document.getElementById("txtrm_name");
srm_name.value = rm_name;
var strans_name = self.opener.document.getElementById("txttrans_name");
strans_name.value = trans_name;
var stype_code = self.opener.document.getElementById("txttype_code");
stype_code.value = type_code;
var stype_name = self.opener.document.getElementById("txttype_name");
stype_name.value = type_name;
var spack_code = self.opener.document.getElementById("txtpack_code");
spack_code.value = pack_code;
var spack_name = self.opener.document.getElementById("txtpack_name");
spack_name.value = pack_name;
var sunit = self.opener.document.getElementById("txtunit");
sunit.value = unit;
var spack_weight = self.opener.document.getElementById("txtpack_weight");
spack_weight.value = pack_weight;
var scar = self.opener.document.getElementById("txtcar");
scar.value = car;
var spk_weight = self.opener.document.getElementById("txtpk_weight");
spk_weight.value = pk_weight;
var sweight = self.opener.document.getElementById("txtweight");
sweight.value = weight;
var sdiff = self.opener.document.getElementById("txtdiff");
sdiff.value = diff;
var sname = self.opener.document.getElementById("txtn");
sname.value = name;
var swage_code = self.opener.document.getElementById("txtw");
swage_code.value = wage_code;
var spo_ref = self.opener.document.getElementById("txtpo_ref");
spo_ref.value = po_ref;
window.close();
}
</script>
ฟอร์มที่รับค่ะ
Code (PHP)
<input name="checkbox1" type="checkbox" id="checkbox1" value="Y"/>
Tag : MySQL
|
|
|
|
|
|
Date :
2013-08-29 15:51:19 |
By :
supattra.s |
View :
1312 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JavaScript Send Checkbox Data from Popup to Main form
|
|
|
|
|
Date :
2013-08-29 20:38:57 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|