...

View Full Version : open all link in blank page



scsi
04-26-2004, 08:13 PM
hi,
can anyone provide me with a jscript or maybe css tag to have all links on a page opened in a blank window?

thanks in advance

Basscyst
04-26-2004, 08:33 PM
Hello:

If you want them to open in a new window and a new instance of a window for each link that is clicked after the first. Change the window name each time you call the function. Keep all the names the same and it will replace the contents after the first pop-up.



<html>
<head>
<script type="text/javascript">

function newWin(url,window_name)
{
var my_win=window.open(url,window_name)
my_win.focus();
return false;
}
</script>
</head>
<body>
<a href="#" onclick="newWin('http://www.codingforums.com','win1');">Coding Forums</a>
<a href="#" onclick="newWin('http://www.codingforums.com','win2');">Coding Forums</a>
<a href="#" onclick="newWin('http://www.codingforums.com','win1');">Coding Forums</a>
</body>
</html>



Basscyst

scsi
04-26-2004, 08:55 PM
no, that's no good..
I need something that apply at all links without specifying nothing in them..

Willy Duitt
04-26-2004, 09:43 PM
It's not advisable but you could try:
<BASE TARGET="_blank">

.....Willy

shlagish
04-26-2004, 10:14 PM
this goes in the header by the way...

scsi
04-27-2004, 11:58 AM
hey guys thanks very much for help, the solution

<BASE TARGET="_blank">

is what i was searching for.

isn't possible to assign that as a css style?

jbot
04-27-2004, 01:42 PM
isn't possible to assign that as a css style?


er .... no. :p

styles are for presentation formatting, not presentation mark-up. the former deals with the actual look, not the code that builds the interface.
;)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum