Top frame
<head>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/blockUI.js"></script>
</head>
<script language="javascript">
<!--
function blockUI() {
$.blockUI({ message: null });
}
function unblockUI() {
$.unblockUI();
}
-->
</script>
HTML
<div>
<iframe id="myframe"></iframe>
</div>
Second frame
<script language="javascript">
<!--
function AddDevice(content)
{
window.open( content ,'PopupWindow','resizable=yes,scrollbars=yes,width=740,height=600,top=20,left=100');
top.blockUI();
}
-->
</script>
<button id="DHCPBtn" onclick="AddDevice('../a.htm');">DHCP</button>
Popup window
When user click the DHCPBtn button of second frame, then popup the window. After setting, user press the close button.
<button class="button floatright" onClick="window.opener.top.unblockUI();self.close();" type="button">Close</button>
The funcion will call function unblockUI of first frame.
0 意見:
張貼留言