Need bring-to-front code for pop-up windows

mrskill

New Member
Hi, I have a music site, and on one page surfers can click on song titles and it opens up a pop-up window containing the lyrics.

When you click onto the main window again, the pop-up then relegates to underneath it, and if you click on the same link again, you get nothing - unless you closed the pop-up first.

How can I modify my javascript so clicking on the pop-up link will bring an already open window to the front?

Here is the popup code currently:

Code:
<a href="javascript:void(window.open('rpages/dragofsloth.html','The Drag of Sloth','resizable=1,width=585,height=420,top=60,left=60'))">1. The Drag of Sloth</a>
 

webagent

New Member
Had a quick look myself and thought this may be helpful.

<body onBlur="setTimeout('self.focus()',500)">

This should place a time out on the window and make it constantly appear on top. But and old school way is to name the window and target it maybe using the focus() within your link. This way the focus function should be applied to the window sitting in the background and the new content loaded in it. Hope that is helpful.
 
Top