Solved

Force new Open Window to stay on top ?

Posted on 2000-05-13
4
2,551 Views
Last Modified: 2013-12-25
I have opened a new window using VBScript as follows:

    strOptions = "toolbar=No, location=No, directories=No, "
    strOptions = strOptions & "status=No, menubar=No, scrollbars=No, "
    strOptions = strOptions & "resizable=No, width=800, height=600,"
    strOptions = strOptions & "top=0, left=0"
    newWindow = Window.Open(otherURL, "myNewWindow", strOptions)

I have noticed when I click the other window underneath, the newWindow disappeared into the back and got covered by the other window.  Is there any way of forcing the newWindow to stay on top no matter what I click ??
0
Comment
Question by:tinson
  • 2
4 Comments
 

Author Comment

by:tinson
ID: 2807405
Adjusted points from 100 to 200
0
 
LVL 4

Expert Comment

by:chewymon
ID: 2809280
Here is  JavaScript solution.  This goes into the head and body of the page you wish to stay on top.  The number 3000 is the number of milliseconds until the window is refocused; in this case 3 seconds.  You can set it for whatever you want.

<SCRIPT LANGUAGE="JavaScript">
<!-- Hide from older browsers
function setTimer(){
      setTimeout ("window.focus()",3000);}
// end hiding -->
</SCRIPT>

</HEAD>
<BODY onBlur="setTimer()" BGCOLOR="#ffff80">
0
 
LVL 7

Accepted Solution

by:
nettrom earned 200 total points
ID: 2810201
Two possible solutions.  You mention that you use VBScript, so I expect your audience to be IE-only?  Maybe you should open a modal dialog window instead, that way the user will have to acknowledge (/close) the window before access to the other window is possible.

See http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/showmodaldialog.asp

Danny Goodman has written an article about cross-browser compatible modal dialog windows: http://developer.iplanet.com/viewsource/goodman_modal/goodman_modal.html
0
 

Author Comment

by:tinson
ID: 2941899
Comment accepted as answer
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Read about why website design really matters in today's demanding market.
I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question