1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to make button open in a new tab?

Discussion in 'HTML & JavaScript' started by freezeice04, Apr 3, 2013.

  1. freezeice04

    freezeice04 Power Member

    Joined:
    Jul 5, 2010
    Messages:
    675
    Likes Received:
    287
    Location:
    AU
    Hi, I use wordpress and I'd like to have it so whenever users click on a button, it opens it in a new window. Adding target="_blank" doesn't seem to work for some reason. Here's the code:

    [button color="red" url="www.website.com" size="medium"]Insert Text Here[/button]


    Thanks
     
  2. kanta002

    kanta002 Registered Member

    Joined:
    Dec 8, 2012
    Messages:
    72
    Likes Received:
    8
    Using target="_blank"
     
  3. freezeice04

    freezeice04 Power Member

    Joined:
    Jul 5, 2010
    Messages:
    675
    Likes Received:
    287
    Location:
    AU
    How does the final code look like? It doesn't work for me.
     
  4. soothsayerpg

    soothsayerpg Power Member

    Joined:
    Feb 23, 2011
    Messages:
    588
    Likes Received:
    225
    Its generally used in HTML/XHTML, try translating it to BBCODE.
     
  5. freezeice04

    freezeice04 Power Member

    Joined:
    Jul 5, 2010
    Messages:
    675
    Likes Received:
    287
    Location:
    AU
    I'm not sure what you mean, can you give me the final code of what it should look like?
     
  6. dewaz

    dewaz Regular Member

    Joined:
    Nov 27, 2011
    Messages:
    408
    Likes Received:
    50
    Home Page:
    <a href="www.yoursite.com" target="_blank"><img src="picbutton.jpg"></a>
     
  7. Optimism

    Optimism Newbie

    Joined:
    Apr 20, 2013
    Messages:
    23
    Likes Received:
    2
    You can't use target in BB code, this will probably require editing of the actual translation of the bb codes
     
  8. t73nder25

    t73nder25 Newbie

    Joined:
    May 20, 2013
    Messages:
    23
    Likes Received:
    0

    Hey, Ive added you on skype accept me so we cant talk
     
  9. Jaeger

    Jaeger Registered Member

    Joined:
    Apr 12, 2013
    Messages:
    65
    Likes Received:
    3
    Home Page:
    You can set this on any image by writing this code. when you will set this code on any image then if user will click on that particular image he will be redirected to new window and the webpage will open which webpage url you have set in that code.


    <a href="www.website.com" target="_blank"><img src="image.jpg"></a>
     
  10. Bokva

    Bokva Regular Member

    Joined:
    Jan 26, 2010
    Messages:
    201
    Likes Received:
    111
    Occupation:
    Graphic and Web design
    Location:
    Underground
    ...

    EDIT: Now I see you revived old thread. I don't think OP is bothering with this anymore. :)