View Single Post
  #3 (permalink)  
Old 09-14-2008, 11:26 PM
Jacob Abernathy Jacob Abernathy is offline
Member
 
Join Date: Sep 2008
Posts: 5
Jacob Abernathy is on a distinguished road
A simple example of Java hiding all but the last popup
Here is a simple example:


<! The following is popupmultiple.htm:>
<html>
<head>
<script language="javascript" type="text/javascript">
<!--
function popitup1(url) {
newwindow1=window.open(url,'name1','top=100,left=1 00,height=200,width=150');
}
function popitup2(url) {
newwindow2=window.open(url,'name2','top=150,left=1 50,height=200,width=150');
}
function popitup3(url) {
newwindow3=window.open(url,'name3','top=200,left=2 00,height=200,width=150');
}
// -->
</script>
</head>
<body>
<a href="javascriptopitup1('popup1.htm')"
>Link to popup1</a><br />
<a href="javascriptopitup2('popup2.htm')"
>Link to popup2</a><br />
<a href="javascriptopitup3('popup3.htm')"
>Link to popup3</a><br />
</body>
</html>



<! The following is popup1.htm:>
<html>
<body>
<p>This is popup1.</p>
</body>
</html>



<! The following is popup2.htm>
<html>
<body>
<p>This is popup2.</p>
</body>
</html>



<! The following is popup3.htm>
<html>
<body>
<p>This is popup3.</p>
</body>
</html>


No matter what sequence you click the links, only the last one shows above the calling program 'popupmultiple.htm'. Java places the other two underneath this program, as you can see by minimizing it.

Question: How do you make them all stay on top of the calling program?

As far as I can tell, the same property applies to any page with popup links. If you click one, the last one disappears. Why does Java insist on hiding the last popup, when you aren't asking it to do so -- and is there any way to tell it, "Don't do that?"
Reply With Quote