Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-14-2008, 03:21 AM
Member
 
Join Date: Sep 2008
Posts: 5
Jacob Abernathy is on a distinguished road
How do you keep multiple popups visible?
I have an application in which I have small charts in the form of Java popups. I have created these using the Java window.open. There are a couple dozen of these and users can select two or three they would like to look at. I would like them to see all three as they click on the links and be able to stack them.

Unfortunately, the way window.open works, as they click the second, the first disappears behind the calling window and they can see it only as a minimization tab in the taskbar. I would like them all to stay visible, so they know they are there and can stack them one on top of the other.

If I knew which ones they were going to select, I could call {newwindow.focus()} {newwindow2.focus()} etc., and bring them all in front of the calling page. I've tried this, and it actually works. However, if one of the "newwindowx" is a window "x" that they have not actually chosen yet, a nasty error message appears.

Does anyone know how to do this?

(I would have thought people would want to do this all the time, and I am surprised there is not just an argument in the window.open saying, "Do not do anything to the last popup.")
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-14-2008, 04:46 AM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,223
Norm is on a distinguished road
Do you have a small program that demonstrates the problem that you could post for all to see?
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 09-14-2008, 11:26 PM
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?"
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 09-15-2008, 01:40 AM
Member
 
Join Date: Sep 2008
Posts: 5
Jacob Abernathy is on a distinguished road
The stick-out-your-tongue face covers "colon-p"
I just noticed the stick-out-your-tongue face icon covering what is supposed to be "colon-p" back-to-back in three places in the above.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 09-15-2008, 01:44 AM
Member
 
Join Date: Sep 2008
Posts: 5
Jacob Abernathy is on a distinguished road
Clarification of last message
Just in case somebody might get the wrong idea, there is no "hypen" -- it is just colon then the letter "p" back-to-back.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 09-15-2008, 01:47 AM
Fubarable's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 870
Fubarable is on a distinguished road
You know of course that your question has absolutely nothing to do whatsoever with the Java programming language, right? That Java and JavaScript are two completely different animals, and that asking for advice on this here is like asking your barber if you should have a colonoscopy (my answer is yes, if you are over 50, have unexplained bleeding, or a significant family history). I recommend that you find a JavaScript forum for these questions. Much luck.
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 09-15-2008, 08:35 PM
Member
 
Join Date: Sep 2008
Posts: 5
Jacob Abernathy is on a distinguished road
Thanks
Hi Fubarable,

Thanks much for the clarification. No, I didn't know that. I guess it shows how much I know -- or more appropriately don't know -- about either! I appreciate your help. I will try to find a JavaScript forum and post the question there.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nodes and edges..making visible and invisible based on distance sfaiz Java Applets 1 09-18-2008 02:59 AM
Added JAR File is not visible in programs (Eclipse Europa/JBoss4.2.2 GA/EJB3.0) Ramesh Eclipse 0 08-04-2008 02:17 PM
Multiple applets themburu Java Applets 1 06-20-2008 03:41 PM
How to make popups like in eclipse ekadosh SWT / JFace 0 02-04-2008 09:58 AM
Use multiple forms coco Java Applets 1 08-04-2007 12:56 AM


All times are GMT +3. The time now is 08:03 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org