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.
The forum of the forums
4 posters

    Need some code to enable new tab

    avatar
    Bangernomics
    Forumember


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

    Solved Need some code to enable new tab

    Post by Bangernomics Thu 31 Jan 2013 - 16:08

    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 Thu 31 Jan 2013 - 23:57; edited 1 time in total
    avatar
    runawayhorses
    Hyperactive


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

    Solved Re: Need some code to enable new tab

    Post by runawayhorses Thu 31 Jan 2013 - 16:11

    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>
    Sir Chivas™
    Sir Chivas™
    Helper
    Helper


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

    Solved Re: Need some code to enable new tab

    Post by Sir Chivas™ Thu 31 Jan 2013 - 16:12

    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');">
    avatar
    Bangernomics
    Forumember


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

    Solved Re: Need some code to enable new tab

    Post by Bangernomics Thu 31 Jan 2013 - 16:25

    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

    Solved Re: Need some code to enable new tab

    Post by Bangernomics Thu 31 Jan 2013 - 16:57

    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
    runawayhorses
    Hyperactive


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

    Solved Re: Need some code to enable new tab

    Post by runawayhorses Thu 31 Jan 2013 - 19:20

    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>
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51500
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Need some code to enable new tab

    Post by SLGray Thu 31 Jan 2013 - 20:08

    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.
    avatar
    Bangernomics
    Forumember


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

    Solved Re: Need some code to enable new tab

    Post by Bangernomics Thu 31 Jan 2013 - 23:56

    Thank you Very Happy
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51500
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Need some code to enable new tab

    Post by SLGray Fri 1 Feb 2013 - 1:03

    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.

      Current date/time is Tue 24 Sep 2024 - 9:26