Wasim Shaikh
Wasim Shaikh

Reputation: 7030

How to Open New window on every Click

There is a link , on click of the some link, new window should open, User can minimize that window and click on other link other window should be open. so there will be multiple windows.

There is one jQuery plug-in which doing the same but its works only in Firefox. Not in Internet Explorer.

Upvotes: 1

Views: 2814

Answers (4)

Krzysztof Romanowski
Krzysztof Romanowski

Reputation: 2194

I use the rel attribute for links. For example:

<a href="http://www.example.com/" rel="external" />

In jQuery:

$('a[rel=external]').attr('target', '_blank');

Upvotes: 0

Harry Joy
Harry Joy

Reputation: 59694

You can also try:

<script>
var i=1;
    function openWin2(){
        window.open("http://stackoverflow.com", "Win"+i++, 'location=0');
    }
<script>

.....

<a href="javascript:openWin2()">Click to open window </a>

Hope this helps.

Upvotes: 1

apros
apros

Reputation: 2878

Try to use javascript function window.open() . One of the reference for using is here: http://www.pageresource.com/jscript/jwinopen.htm

Upvotes: 1

tdammers
tdammers

Reputation: 20706

What's wrong with <a href="http://www.example.com/" target="_blank" />?

Upvotes: 3

Related Questions