html open a url on new target and focus.
Posted
by
richard
on Stack Overflow
See other posts from Stack Overflow
or by richard
Published on 2010-12-28T13:48:53Z
Indexed on
2010/12/28
13:54 UTC
Read the original article
Hit count: 117
I am trying to fix a web site.
It opens a help page in a new window/tab via <a href="..." target="help">
(no other frame has this name)
This works well the first time opening a new window/tab, for the help. But on subsequent clicks the window/tab is loaded but remains hidden.
I tryed this:
<script>
function OpenAndFocusHelp() {
win=window.open('help/1000CH00017.htm','help');
win.focus();
}
</script>
<a href="help.html" target="help"
onclick="OpenAndFocusHelp()">Help</a>
It did not work!
© Stack Overflow or respective owner