Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Re: open mutiple link in same window

Status
Not open for further replies.

firehorse24

Programmer
Sep 22, 2006
28
0
0
US
Hi Everyone,

I have a page that contain mutiple links. What I try to do is: when I click those links I want those links to be opened in the same window.

Can anyone help me with it please?

Thanks ahead!
 
By default, links do open in the same window, unless either:

- You have specified otherwise (using JS or using the "target" attribute), or

- The user has configured their browser to always open links in a new tab / window.

Therefore, you should need no code to do this - it should be automatic.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Hi Dan,

I'm sorry, I didn't explain clearly. What I want to do is:
the 1st link user click open a new window instead of staying in parent window. other links open in that new window instead of keeping opening another window. Can I do that?

Thanks!



 
Yes - simply give them all the same "target" attribute, e.g.

Code:
<a href="whatever" target="InsertCustomWindowNameHere">text</a>

<a href="something" target="InsertCustomWindowNameHere">else</a>

<a href="wibble" target="InsertCustomWindowNameHere">bibble</a>

As you can see, no JS is required.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Hi Dan

I've tried you way before. The problem is when I click the 1st link, I got the new window popup has no problem. But when I click the other links, the window was minimized. it looks like the window was closed. It's going to confuse the user. How can I keep the window maxmized so the user can always see the pages they clicked?


Thanks


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top