link creating new page while view page remains active
Moderator: General Moderators
link creating new page while view page remains active
Hi I wanted to find out how I can create code for a link where it opens the page in a new tab or window while the page of which i clicked upon remains active. Any help is greatly appreciated.
- EverLearning
- Forum Contributor
- Posts: 282
- Joined: Sat Feb 23, 2008 3:49 am
- Location: Niš, Serbia
Re: link creating new page while view page remains active
in <a> tag you need to set "target" attribute to value "_blank", like this
Is that what you meant?
Code: Select all
<a href="http://some.link.com" target="_blank">Some.Link.Com</a>
Last edited by EverLearning on Wed Feb 27, 2008 2:58 am, edited 1 time in total.
Re: link creating new page while view page remains active
hi everlearning, thanks for your reply, i got one problem though. i want the page which i was viewing to remain open or active while the page which opens on clicking on the <a> tag to load in the tab in an inactive status (in other words to load while the page i am viewing to remain open. if that is possible
- EverLearning
- Forum Contributor
- Posts: 282
- Joined: Sat Feb 23, 2008 3:49 am
- Location: Niš, Serbia
Re: link creating new page while view page remains active
It is possible, but you'll need to use some javascript to do that, and to make sure that the script works correctly for several browsers. Most of the browser already have the ability to open links in background tabs or windows, if user wants to. What do you need that for, anyway?
Re: link creating new page while view page remains active
thats exactly what I Want. I want the users to open links without leaving my website. so how do I do it?
- EverLearning
- Forum Contributor
- Posts: 282
- Joined: Sat Feb 23, 2008 3:49 am
- Location: Niš, Serbia
Re: link creating new page while view page remains active
Take a look at this link:
http://snippets.dzone.com/posts/show/2915
its a code snippet for what you want, bu also read this:
http://www.thescripts.com/forum/thread586528.html
where someone else wanted something similar, but had problems with browser security settings.
http://snippets.dzone.com/posts/show/2915
its a code snippet for what you want, bu also read this:
http://www.thescripts.com/forum/thread586528.html
where someone else wanted something similar, but had problems with browser security settings.
Re: link creating new page while view page remains active
Thanks a lot lemme take a look at the snippets.
Re: link creating new page while view page remains active
This isnt a browsers favourite way of opening windows, it's the same way a lot of old pop-under ad's used to work. Be sure your visitors know that you have opened this window or they may close it thinking its a spam pop-under.