Click to See Complete Forum and Search --> : For the HTML Gurus
bussocrazy
09-27-2007, 11:25 AM
Alright here is the question. Is there a way you can code a link that will open a site in a new window behind the active browser window while redirecting the active window to a new page? Im guessing it would be nested a href tags but not really for sure. Any suggestions?
Nope, that would be javascript. In your hyperlink put JavaScript:Links()
for the function you would want something like
<script type="text/javascript">
function Links() {
window.open("url1");
location.href="url2";
}</script>
This will change the current page's address as well as open another window.
KDLA
Declan1991
09-27-2007, 05:16 PM
But make sure the HTML link goes somewhere just in case Javascript is disabled.
WebJoel
09-27-2007, 05:37 PM
Kewl. -Rather like BonRouge's trick for opening two windows w/ one click.. here: http://bonrouge.com/br.php?page=faq#twoNewWindows