How do I bring a <a TARGET=xxx> window to front if it's already op

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I don't know where to ask this question. If you know of a better place to
ask it, please let me know.

I have a main web page containing many links to detail pages. All detail
links open with Target=xxx, so that I only have 1 detail page open at a time.
In other words, if you click on detail line 1, it opens a new internet
explorer window with detail page. You can then alt-tab back to the main
window, click a detail line 2, and it opens the detail in the second window
again. The problem is, that this second window is now behind the main
window. Unless the user knows to alt-tab back to the second window, they
might not realize that the detail is displayed in the background window.
I've had complaints that they want this detail to come back to the foreground
when it displays. Granted, if they would just close the detail window, then
select a new detail line, it would open in the foreground, but I can't force
them to do this.

How can I always force the Target= window to come to the foreground, even if
it was already open in the background?
 
Brian,

If you are talking about ASPNET. A user is in that forever only working with
one page, which interact with the Server. You can have more pages inactive
open at client side (by instance Iframes), however than still you have to
store your information on the Server by instance in the session.variables

I hope this helps,

Cor
 
Hi, Brian...

Quite simple to solve your problem...

On the detail page just put a simple JScript like below:

<script language="JSCRIPT">
function page_OnLoad()
{
document.all.dummy.focus();
document.all.dummy.style.display = 'none';
}
</script>

Then towards the end of the body you just need to put the following

<body onload="jscript:page_OnLoad()">
....
<input name="dummy" id="dummy" type=text style="width:1px;height:1px">
</body>

And the window will come to front because only ONE window can have the
focus at any time.

Regards,

Paulo
 
Well, this would work perfectly, but I forgot to mention one piece. I can't
put any coding of any type on the detail page. The detail pages are owned by
a third party, and I don't have access to their code. I can do anything I
want on the main page, but I can't change the code on the detail, so I'm
handicapped there. Whatever I do for a solution has to be done on the main
page.
 
Hi Brian,

I just saw your repply today.

I believe (I haven't tested it myself) is to put something like this:

function OpenWindow()
{
w = window.open('http://address.com');
w.focus();
}

It might work.

Regards,

Paulo
 
Back
Top