J
JSjones
when a form is submitted from the main window i want a pop up window
to open from the onclick event. i have that working, now how can i
close the pop up window from the main window after the main window
finishes loading? i've been racking my brain on this for the last two
days. here is the code for the parent window that i have been testing
with.
testfoo.htm is just a blank html page used for testing.
<head>
<title>Personnel Information</title>
<script language="javascript" type="text/javascript">
var newWindow;
//alert(newWindow + " page load");
function openDialogWin() {
var height = "300";
var width = "500";
var x = (screen.width - width) / 2;
var y = (screen.height - height) / 2;
var Name = window.name;
//alert(height + ", " + width);
features = "height=" + height + ",width=" + width + ",left="
+ x + ",top=" + y;
features += ",menubar=no,resizable=no,titlebar=no,scrollbars=no,status=no,toolbar=no,menubar=no,location=no";
var newWindow = window.open(unescape("/testfoo.htm"),
"newWindow", features);
//alert(newWindow.name + " in openDialogWin");
return newWindow;
}
function closeDialogWin() {
if (newWindow && !newWindow.closed)
newWindow.close();
}
</script>
</head>
<body onLoad="closeDialogWin();">
<form method="post">
<input type="submit" name="foo" value="Submit"
onclick="openDialogWin();">
</form>
</body>
</html>
sorry about the formatting... it looks ok in the editing window. if
anyone can clue me in on how to format the code for the boards, i'll
do my best to comply.
thanks in advance
jones
to open from the onclick event. i have that working, now how can i
close the pop up window from the main window after the main window
finishes loading? i've been racking my brain on this for the last two
days. here is the code for the parent window that i have been testing
with.
testfoo.htm is just a blank html page used for testing.
<head>
<title>Personnel Information</title>
<script language="javascript" type="text/javascript">
var newWindow;
//alert(newWindow + " page load");
function openDialogWin() {
var height = "300";
var width = "500";
var x = (screen.width - width) / 2;
var y = (screen.height - height) / 2;
var Name = window.name;
//alert(height + ", " + width);
features = "height=" + height + ",width=" + width + ",left="
+ x + ",top=" + y;
features += ",menubar=no,resizable=no,titlebar=no,scrollbars=no,status=no,toolbar=no,menubar=no,location=no";
var newWindow = window.open(unescape("/testfoo.htm"),
"newWindow", features);
//alert(newWindow.name + " in openDialogWin");
return newWindow;
}
function closeDialogWin() {
if (newWindow && !newWindow.closed)
newWindow.close();
}
</script>
</head>
<body onLoad="closeDialogWin();">
<form method="post">
<input type="submit" name="foo" value="Submit"
onclick="openDialogWin();">
</form>
</body>
</html>
sorry about the formatting... it looks ok in the editing window. if
anyone can clue me in on how to format the code for the boards, i'll
do my best to comply.
thanks in advance
jones