Force Window On Top Solved!

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
whaywardj
Beginner
Beginner
Posts: 4
Joined: Thu Dec 09, 2004 8:40 pm

Force Window On Top Solved!

Post by whaywardj »

Thanks to Ruth.

Issue: Make secondary window from first menu-click stay on top of main window so 1) menu remains visible; 2) content from subsequent menu-clicks recycles in that window; and 3) it stays on top during content cycling.

Java function in (my) main page is:

Code: Select all


<script language="JavaScript">
<!--
var newwindow; 
function poptop(url) 
{ 
   newwindow=window.open(url,'name','height=400,width=200'); 
   if (window.focus) {newwindow.focus()} 
} 
</script>

(My) Milonic *.js menu item link configuration is:

Code: Select all


aI("text=IEC/ISO Standards;url=javascript:poptop('http://www.standardsinfo.net/isoiec/stdcat.html')");

Target features are handled in the function statement. On slow machines, it's a little in-elegant but, for my purposes, preferred over having the secondary window open and/or cycle content behind the main window.

Thanks again, Ruth.

Oops! ERROR. I dropped a semi-colon in the menu item string when copying it to the forum. Menu item strings need to read as follows for the "on top" function to be called:

Code: Select all


aI("text=Estimating Documentation Costs;url=javascript:poptop('pdf/estimating.pdf');");

Note the two semi-colons at the end.[/code]
Last edited by whaywardj on Fri Dec 10, 2004 11:09 pm, edited 1 time in total.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

You're welcome, I learned something new :D . As to the bottom scroll links. I'm not sure I understand what you meant about that, but I'd think if you didnt' want a new window for each click, you could just make another function like this one on that page and give the window a different name?

Ruth
Post Reply