JavaScript Add onclick to open to a new tab or window
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Add onclick to open to a new tab or window

  1. #1
    Join Date
    Oct 2012
    Posts
    1

    Post Add onclick to open to a new tab or window

    Hey folks, I am not a Web guy/girl by any means here but need help to add an onclick or something when someone clicks on a iframe I made

    here is the iframe

    <iframe src="http://www.runtastic.com/en/users/Neall-Hards-2" width="645" height="525" align="right" scrolling="no"></iframe>

    basically this iframe is on my website http://sponsorneall.webnode.com/watch-neall-run/ - (Yeah I know template site I am no purist by any means), but as you can see when someone currently clicks on the map to watch me run it just opens to the same iframe which is not big enough, I would like it to open a new tab or window.

    I have zero idea what to do here, so sorry in advance for the hand holding request.

    Thanks in advance

  2. #2
    PeejAvery's Avatar
    PeejAvery is online now Super Moderator Power Poster
    Join Date
    May 2002
    Posts
    10,869

    Re: Add onclick to open to a new tab or window

    Any link in the source of the <iframe> src needs to have the target property set.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center