J
jpw
My objective is to open a window in the background (using body onload
of my initial page), giving it a chance to load. Upon an event from
the initial window (a button in my example), I want to bring the
"loading window" to the foreground. Consider the sample code below.
The second window (the one I'm loading in the background) will not
come to focus (or, it won't stay in focus).
Thanks for your help:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<SCRIPT LANGUAGE="JavaScript">
function jpw(x) {
if (x==1) {
me.blur;
myWindowHandle = window.open("","map")
myWindowHandle.focus()
}
else
{
myWindowHandle = window.open("http://www.exeter.edu/map/link/
2005StudentTour.html","map");
myWindowHandle.blur()
}
}
</SCRIPT>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body onload="jpw('2');">
<p>Primary Window</p>
<p> </p>
<form id="form1" name="form1" method="post" action="">
<input type="submit" name="Submit" value="Submit"
onclick="window.open('','map').focus(); />
</form>
<p> </p>
</body>
</html>
of my initial page), giving it a chance to load. Upon an event from
the initial window (a button in my example), I want to bring the
"loading window" to the foreground. Consider the sample code below.
The second window (the one I'm loading in the background) will not
come to focus (or, it won't stay in focus).
Thanks for your help:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<SCRIPT LANGUAGE="JavaScript">
function jpw(x) {
if (x==1) {
me.blur;
myWindowHandle = window.open("","map")
myWindowHandle.focus()
}
else
{
myWindowHandle = window.open("http://www.exeter.edu/map/link/
2005StudentTour.html","map");
myWindowHandle.blur()
}
}
</SCRIPT>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body onload="jpw('2');">
<p>Primary Window</p>
<p> </p>
<form id="form1" name="form1" method="post" action="">
<input type="submit" name="Submit" value="Submit"
onclick="window.open('','map').focus(); />
</form>
<p> </p>
</body>
</html>