|
 |
|
JavaScript ต้องการให้เปิด Popup ตาม Checkbox อะครับ ไม่ทราบต้องทำยังไง |
|
 |
|
|
 |
 |
|

JavaScript Send Checkbox Data from Popup to Main form
|
 |
 |
 |
 |
Date :
2013-05-08 06:21:51 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณครับ ได้แล้วครับ เอามาดัดแปลงดังนี้ :D
<script language="javascript">
function selValue(w,h,scroll)
{
var val = '';
for(i=1;i<=form.hdnLine.value;i++)
{
if(eval("form.page"+i+".checked")==true)
{
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
setTimeout(window.open(eval("form.page"+i+".value"),i,settings),1000);
}
}
}
</script>
<form id="form" name="form" method="post" action="#">
<table width="500" style="border:1px solid #06F;" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FFFFFF" height="150">
<input type="checkbox" name="page1" id="page1" value="table.php" /> :
<input type="text" name="text" id="text" value="ตาราง" style="width:440px;" readonly /><br/>
<input type="checkbox" name="page2" id="page2" value="student.php" /> :
<input type="text" name="text" id="text" value="นักเรียน" style="width:440px;" readonly /><br/>
<input type="checkbox" name="page3" id="page3" value="groups.php" /> :
<input type="text" name="text" id="text" value="กลุ่มสาระการเรียนรู้" style="width:440px;" readonly /><br/>
<input type="checkbox" name="page4" id="page4" value="rally.php" /> :
<input type="text" name="text" id="text" value="ชุมนุม" style="width:440px;" readonly />
</td>
</tr>
<tr>
<td bgcolor="#0066FF"><div><center>
<input type="submit" name="install" value="ติดตั้ง" style="width:80px;" onClick="JavaScript:selValue('500','200','no');" />
<input type="button" name="back" value="กลับ" style="width:80px;" onclick="JavaScript:window.location='../register.php'" />
</center></div></td>
</tr>
</table>
</form>
|
ประวัติการแก้ไข 2013-05-08 13:23:15 2013-05-08 13:26:43 2013-05-08 13:38:58 2013-05-08 14:02:35
 |
 |
 |
 |
Date :
2013-05-08 13:22:53 |
By :
dreamt256 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|

|
 |
 |
 |
 |
Date :
2013-05-08 13:30:22 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 02
|