Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pop-up to front

Status
Not open for further replies.

Werewolf

Programmer
May 20, 2002
3
US
I wan't to keep a menu bar in a pop up window and while I click on the buttons in the menu bar I wan't the brouser window below to change to the relevant page always keeping the menu pop up on top?
 
Use a frameset - with subtlety it can achieve pretty good results. Or you could use an iframe I suppose - which is the same as a frame - you can change it's src, but it is displayed as part of the document - not an actual frame.

These have z-index and transparency now too - check out:


b2 - benbiddington@surf4nix.com
 
If you want a "floating window nav menu" like the one you described, you must have a way to keep the window from "losing focus". Losing focus means the window disappears behind the other windows, and you don't want that in this case.

Therefore whenever the user clicks on one of the nav buttons it should call a function that does two things: 1) change the page on the window below, 2) set the focus back on the nav window.

The function would look like this:
Code:
function changePage(URL)
{
window.opener.location = URL;
window.focus();
}
Note that the URL is passed as an argument in the function, so that this function can be used for multiple nav links.

The link for the nav button would look like this:
Code:
<a href=&quot;javascript:changePage('page2.html')&quot;>Go to page 2</a>

Hope this helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top