freeeki
07-12-2004, 04:57 AM
hi everybody,
is it possible to make a named browser window allways pop-up on top of all other windows.
and is it possible to position it relative to another window's content.
thx :)
pyrexyn
07-12-2004, 08:39 AM
This would probably be more helpful in the JavaScript Forum. Even though I don't use JavaScript, here's what I think would help (using W3Schools):
posHoriz = oldWindowName.screenLeft;
posVerti = oldWindowName.screenTop;
Store the variables for the position of the window with the content.
\\Somehow get the position of the actual content within the oldWindow
\\and store it into contHoriz and contVerti
Now if you add the window position to the content position, you should roughly get the position in which the next window should appear at. I say "roughly" because I don't think the Status bar, Standard buttons, etc. is accounted for.
newHoriz = posHoriz + contHoriz;
newVerti = posVerti + contVerti;
Now, when you provide a link to open this new window, do something like this:
open("URL","_blank","left=newHoriz,top=newVerti[,otherVars]");
And this should make a new window the specified position.
I never really use JavaScript so this is all guesswork based on http://www.w3schools.com/htmldom/dom_obj_window.asp - so if this doesn't work, place your post and my script above in the JavaScript forum and someone should be able to tweak the code so it works.
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.