Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Keeping a window on top

Posted on 2000-05-05
8
Medium Priority
?
200 Views
Last Modified: 2012-05-04
I'm using Javascript1.2, in both IE 5 and Netscape 4.6.   I have a javascript funciton that opens a window. I need for this window to always be on top. Currently I'm using the alwaysRasied feature (though I can't guarentee that users will have UniversalBrowserWrite privilege). In addition this doesn't work in IE. (according to my docs)

Is there a way to do this?

Here's my current open call:

  var w=window.open('','winName', config='height=250,width=500,resizable=yes,scrollbars=yes,alwaysRaised=yes,menubar=yes,screenX=0,left=0,top=0');

If the answer is no - then is there a way I can find a window object by name? I could then close the window and reopen it. Though that's not very efficient.

Thanks
0
Comment
Question by:winkle
8 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 2783529
what you could do is that when the focus chenges you just set the focus back again. Like inside the Body tag you put: onBlur='this.focus()'

0
 

Expert Comment

by:webhornet
ID: 2784847
you probably can't use the unBlur in the body tag because this is not valid according html4.

try this:
<BODY onLoad="window.setInterval('this.focus()',10)"
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 2785334
HMMMMM......true!
you can put a function in it which loops through every object in the page and when there is NO object focussed then you focus back *that function should be called in the onBlur of all the other object*.....doesn't seem like a good idea to me at all though.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:winkle
ID: 2793993
I tried the OnLoad suggestion from webhornet. It didn't work.
0
 
LVL 9

Accepted Solution

by:
Dain_Anderson earned 100 total points
ID: 2795325
In the new window you create, put:

<body onBlur="self.focus()">

Hope that helps.
0
 

Author Comment

by:winkle
ID: 2797794
The onBlur does work, I didn't try it because webhornet stated that it's not a valid tag in HTML4. Is this going to be a problem?
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 2799112
UHM, well....guess not, it works for me. BTW, I said it before Dain did...

Never mind *laughs*.

CJ
0
 

Expert Comment

by:Lisbona
ID: 2940909
i do not undestand somthing,
the <body onBlur="self.focus()"> will make the small wilnow on top but will not let you work in it (if it is a document for example)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

971 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