?
Solved

Force new Open Window to stay on top ?

Posted on 2000-05-13
4
Medium Priority
?
2,563 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 600 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

Automating Terraform w Jenkins & AWS CodeCommit

How to configure Jenkins and CodeCommit to allow users to easily create and destroy infrastructure using Terraform code.

Question has a verified solution.

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

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

762 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