www.webdeveloper.com
Results 1 to 5 of 5

Thread: targeting 1 iframe with multiple links

  1. #1
    Join Date
    Nov 2009
    Posts
    2

    Question targeting 1 iframe with multiple links

    Hello,

    I have a table with several different links and I want to send each of those links to 1 iframe. I can only figure out how to assign one link to it using name"" but I'd like to assign them all. Does anyone know how to do this?

    here is part of the code is you need to see it:

    <td width="407"><a href="http://www.url.com" target="action">Action</a></td>
    <td width="392" rowspan="8"><iframe name="action" title="Cuneiform" frameborder="0" width="392"></iframe></td>
    </tr>

  2. #2
    Join Date
    Jun 2008
    Location
    Europe
    Posts
    1,096
    I'm not sure if I understand you correctly, as the answer is to simply keep doing what you have already done.

    Like this...
    HTML Code:
    <table><tr>
    <td width="407"><a href="http://www.url.com" target="action">Action</a></td>
    <td width="407"><a href="http://www.cnn.com" target="action">Link 2</a></td>
    <td width="407"><a href="http://www.google.com" target="action">Link 3</a></td>
    </tr>
    <tr>
    <td width="392" rowspan="8"><iframe name="action" title="Cuneiform" frameborder="0" width="392"></iframe></td>
    </tr> 
    </table>

  3. #3
    Join Date
    Nov 2009
    Posts
    2
    oh haha. i feel stupid! thank you for pointing that out.

  4. #4
    Join Date
    Dec 2008
    Posts
    488
    Also, if you want to send all the links on the page to the iframe, use base.
    Code:
    <base target="action" />
    (goes in head)

  5. #5
    Join Date
    Nov 2012
    Posts
    1

    Multiple links opening in one iframe

    So I have one webpage that has multiple links to local documents.
    I am using iframe to load the document in an iframe below the list of links
    The first link opens fine in the iframe below
    When I click on any other link it now opens a new window instead of clearing the iframe below and loading the new document.

    What am I doing wrong?

    -Joe

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles