Solved

Keeping a window on top

Posted on 2000-05-05
8
183 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
[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
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
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 

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 50 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

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

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

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 …
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

626 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