anils
anils

Reputation: 1962

How to open link/url in specific browser tab/window/page?

I have page with list of links/urls with target="_blank". And when I click on any link, it is open in new tab/window/page(lets say in window W), its ok, but waht I want is?, when I click on any other link/url(from list), then that link should be open in window/page W which is already opened/displayed on previous click(i.e. no extra tab/window will open).

Ex. My site have page showing users name & profile link(target="_blank") in list, Lets say user1, user2, user3... , now when I click on profile link of user1 then new window/page will open shows user1's profile in details and now I click on profile link of user2 then user2's profile should be open in window/page in which user1's profile opened/displayed, instead of opening new window/page.

Is it possible? if yes then how?

Is it possible using php or jquery?

Upvotes: 3

Views: 4218

Answers (2)

kasdega
kasdega

Reputation: 18786

It sounds like you just want to name your target....target="someNameHere" and then use that same name in your second link.

<a href="blah.html" target="myTarget">Link 1</a>
<a href="blah2.html" target="myTarget">Link 2</a>

Upvotes: 9

genesis
genesis

Reputation: 50976

var window = window.open("index.html", "nove", "width=800,height=600,menubar=yes,resizable=yes,left=0,top=0");

and after that

var window = window.open("page2.html", "nove", "width=800,height=600,menubar=yes,resizable=yes,left=0,top=0");

Upvotes: 2

Related Questions