Link to home
Start Free TrialLog in
Avatar of afpcos
afpcos

asked on

<TARGET>

I want to be able to click on a link and have it always open a new window even if the link was just clicked on and a window is already open.  When the users clicks on the link again, I want it to open another window.

Can anyone help me?
Avatar of cabrionet
cabrionet

Hi

In the link write target="new"
<A href="your_doc.html" target="new">

I think that this is all you need.

Cabrio

Try JavaScript.
Function WOpen(DocUrl) opens document from address DocUrl in a new window(it's always new).

You need do define a function:

<script>
<!---
function WOpen(DocUrl){
      WinNum = Math.round(Math.random()*100000);
      window.open(DocUrl,WinNum,'');      
}
//-->
</script>

and use it in <a> tag:

<a href=javascript:WOpen('about:blank')>TEST</a><br>
if you use target="new" this will open a new window, but only one for the first time, but don't opens another window on the second click.
The IE will open new browser always. I am not shore about NS.
I have try with NS... it doesnt work. (target=new) But i am always sceptical about java. About 3-5 % of user has java disabled. So if this is not a big site (if links are not generated from a database i would use in all links diferent targets... ) So all the users IS, NS, Java on/off would have a (window party)

Cabrio
after target use "_blank"

target='_blank'

this will force a new window to open on every click.
ASKER CERTIFIED SOLUTION
Avatar of kllewelyn
kllewelyn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial