FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Always-on-top window with Javascript?

 


rameshbn1
Hello People,

Is it possible to make an always-on-top window using javascript?

Is this a silly question? Embarassed
FunDa
If it's a window. make it run the code which goes something like window.focus(self) or something. I don't recall the exact command. I'll have to refer my Jscript reference book.

I think

Quote:
<BODY onBlur="self.focus()">


might work.
badai
create a function that contain both self.focus & onblur=self.focus, put that function onload
cesarernst
And Include in this function resize propertie
Philip
i think that wont work, since it's different between windows programming and website programming, and if it work, then only work on certain browser..
codeman
There's a difference between "always on top" and "always in focus" I think rameshbn1 wants to be able to use the parent window while keeping the child on top... like maybe to display something for reference or something Smile

rameshbn1: correct me if I'm wrong
rameshbn1
Hello Codeman,

I think you are right - I'm trying to make an 'always in focus' window.

You see, I've got this table with links in each cell. When the user hovers mouse over a link, a window is opened and some details specific to that link is written in the opened window. When the user moves over another link, the details in the opened window is updated. I've done this already.

What I want to do now is to keep this window always on top of the page with the table.

It's not good when the popup is opened, the user clicks on the parent page and the popup goes beneath the parent page. Then it wont come back up until the user mannually pulls it out from the taskbar. It makes me mad, it will sure enough make my user mad Rolling Eyes
codeman
First... you were right from the begining.. you want an "always on top" window... the script they gave you provides an "always in focus" window.. which is annoying, or at least it is to me Razz

Anyway, a really simple fix would be, if the details aren't real long, you could use the title attribute of the <a> tag. It will show a tooltip when the user hovers over the link.

If you do not wish to use that method:

From the looks of it... the previously mentioned "always in focus" script is, unfortunately, is the choice most easily found on the web... though it seems, from the examples I've seen, almost more annoying than having to fish for it... kind of messy looking... but it does work.

I did however find this website which seems to be a little more complicated but it creates a modal window... if memory serves me correctly... it probably not what your looking for because I think it locks the parent window... but maybe you can adapt it? Not sure... I hope I've been at least somewhat helpful Smile
rameshbn1
Hi Codeman,

You've been very helpful. The fact that keeps drawing me back to frihost every other day is that you guys are so incredibly helpful with newbies.

After reading all the suggestions, I now have an idea. I've seen 'remote control' windows for some websites, with a link list in them. I'm pretty sure they're done with javascript, and I also think they always stay on top of the parent page. Maybe I'll try to find one which works that way and try to adapt it.

Thanks again.
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.