The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Need some code to enable new tab

4 posters

Go down

Solved Need some code to enable new tab

Post by Bangernomics January 31st 2013, 4:08 pm

I need this code so that when its clicked it opens in a new tab, can anyone help?

Code:
<a href="http://volkszone.com"><img src="http://i1299.photobucket.com/albums/ag78/Bangernomics/Red.jpg"></a>



Last edited by Bangernomics on January 31st 2013, 11:57 pm; edited 1 time in total
avatar
Bangernomics
Forumember

Female Posts : 144
Reputation : 1
Language : English
Location : UK

Back to top Go down

Solved Re: Need some code to enable new tab

Post by runawayhorses January 31st 2013, 4:11 pm

You add a target="_blank" like this below:

Code:
    <a href="http://volkszone.com"><img src="http://i1299.photobucket.com/albums/ag78/Bangernomics/Red.jpg" target="_blank"></a>
avatar
runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 166
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Need some code to enable new tab

Post by Sir Chivas™ January 31st 2013, 4:12 pm

Hi,

Code:
<script type="text/javascript">window.open('http://google.com');</script>
Either that, or add target="_blank" to the originating link/form which landed in this "Photo Gallery Redirect" page.

Code:
<a href="http://google.com" target="_blank">click here</a>
or

Code:
<form action="http://google.com" target="_blank">
    <input type="submit" />
</form>

or
Code:
<meta http-equiv="refresh" content="5; URL=javascript:window.open('http://google.com','_parent');">
Sir Chivas™
Sir Chivas™
Helper
Helper

Male Posts : 6980
Reputation : 457
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||

https://aforums.org

Back to top Go down

Solved Re: Need some code to enable new tab

Post by Bangernomics January 31st 2013, 4:25 pm

runawayhorses wrote:You add a target="_blank" like this below:

Code:
    <a href="http://volkszone.com"><img src="http://i1299.photobucket.com/albums/ag78/Bangernomics/Red.jpg" target="_blank"></a>

Tried this but it doesn't open in a new tab

Code:
    <a href="http://volkszone.com"><img src="http://i1299.photobucket.com/albums/ag78/Bangernomics/Red.jpg" target="_blank"></a>
avatar
Bangernomics
Forumember

Female Posts : 144
Reputation : 1
Language : English
Location : UK

Back to top Go down

Solved Re: Need some code to enable new tab

Post by Bangernomics January 31st 2013, 4:57 pm

Can you tell me how I should add it to my code? sorry but its not clear to me and I know nothing about code


CJ11™ wrote:Hi,

Code:
<script type="text/javascript">window.open('http://google.com');</script>
Either that, or add target="_blank" to the originating link/form which landed in this "Photo Gallery Redirect" page.

Code:
<a href="http://google.com" target="_blank">click here</a>
or

Code:
<form action="http://google.com" target="_blank">
    <input type="submit" />
</form>

or
Code:
<meta http-equiv="refresh" content="5; URL=javascript:window.open('http://google.com','_parent');">


Code:
<a href="http://ourbulgariaforum.com"><img src="http://i280.photobucket.com/albums/kk178/netsniperthefirst/biba.jpg"></a>
avatar
Bangernomics
Forumember

Female Posts : 144
Reputation : 1
Language : English
Location : UK

Back to top Go down

Solved Re: Need some code to enable new tab

Post by runawayhorses January 31st 2013, 7:20 pm

Here you go, I needed to add the blank tag after the url of the site not the image, this will work for you now:

Code:
<a href="http://volkszone.com" target="_blank"><img src="http://i1299.photobucket.com/albums/ag78/Bangernomics/Red.jpg"></a>

Here's your other link not sure which one you wanted:

Code:
    <a href="http://ourbulgariaforum.com" target="_blank"><img src="http://i280.photobucket.com/albums/kk178/netsniperthefirst/biba.jpg"></a>
avatar
runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 166
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Need some code to enable new tab

Post by SLGray January 31st 2013, 8:08 pm

Bangernomics wrote:
runawayhorses wrote:You add a target="_blank" like this below:

Code:
    <a href="http://volkszone.com"><img src="http://i1299.photobucket.com/albums/ag78/Bangernomics/Red.jpg" target="_blank"></a>

Tried this but it doesn't open in a new tab

Code:
    <a href="http://volkszone.com"><img src="http://i1299.photobucket.com/albums/ag78/Bangernomics/Red.jpg" target="_blank"></a>

Bangernomics wrote:Can you tell me how I should add it to my code? sorry but its not clear to me and I know nothing about code


CJ11™ wrote:Hi,

Code:
<script type="text/javascript">window.open('http://google.com');</script>
Either that, or add target="_blank" to the originating link/form which landed in this "Photo Gallery Redirect" page.

Code:
<a href="http://google.com" target="_blank">click here</a>
or

Code:
<form action="http://google.com" target="_blank">
    <input type="submit" />
</form>

or
Code:
<meta http-equiv="refresh" content="5; URL=javascript:window.open('http://google.com','_parent');">


Code:
<a href="http://ourbulgariaforum.com"><img src="http://i280.photobucket.com/albums/kk178/netsniperthefirst/biba.jpg"></a>
Please don't double/triple post. Your post need to be separated by 24 hours before bumping, replying or adding more information. Please use the edit button instead!

Since this is your third reminder, you have received a warning.


Need some code to enable new tab Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51569
Reputation : 3525
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Need some code to enable new tab

Post by Bangernomics January 31st 2013, 11:56 pm

Thank you Very Happy
avatar
Bangernomics
Forumember

Female Posts : 144
Reputation : 1
Language : English
Location : UK

Back to top Go down

Solved Re: Need some code to enable new tab

Post by SLGray February 1st 2013, 1:03 am

Topic Solved & Locked


Need some code to enable new tab Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51569
Reputation : 3525
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum