Results 1 to 5 of 5

Thread: IFRAME question

  1. #1
    Join Date
    Sep 2008
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default IFRAME question

    Hi Guys, my first post here

    I am trying to solve a problem with iframes and hope someone can help.

    I have a html page with two iframes, the one at the bottom consists of thumbnails which when clicked display a larger image of the thumb in the top iframe. All that works fine.
    What I want to know is whether there's a way of making the big image in the top frame also clickable. I want it to open in a new window and display a larger version of it.

  2. #2
    Join Date
    Sep 2008
    Location
    Whiteford, MD
    Posts
    39
    Thanks
    1
    Thanked 2 Times in 2 Posts

    Default

    Make it a link via the <a> tag and set the styles of it on that page to a fixed dimension, constricting it. Then on the link with the actual image, show it's real height/width.

  3. The Following User Says Thank You to SpOrTsDuDe-Reese For This Useful Post:

    Ritchie (09-17-2008)

  4. #3
    Join Date
    Sep 2008
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Not sure if I follow you on that.
    This is the code for the frames on the main html file:

    <iframe src="/img/pic1.html" name="ImageFrame" width=600 height=448 scrolling=no border="0" frameborder="0" allowtransparency="true" align="center">
    </iframe>

    <iframe src="thumbs.html" name="ThumbsFrame" width=750 height=75 border="0" frameborder="0" style="position:absolute; top:520px; left:130px" allowtransparency="true">
    </iframe>

    This is the code for the Thumbs Frame:

    <a href="/img/pic1.html" target="ImageFrame"><img src="/thumbs/th_pic1.jpg"></a>

    This is the code on the pic1.html file which displays in "ImageFrame":

    <img src="/images/pic1.jpg"></a>

  5. #4
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    If this is the image you want to link and open a new window:
    Code:
    <img src="/images/pic1.jpg">
    ...you can add highlighted:
    Code:
    <a href="/images/pic1.jpg" onclick="window.open('/images/pic1.jpg');return false;"><img src="/images/pic1.jpg"></a>
    Hope that helps.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  6. The Following User Says Thank You to rangana For This Useful Post:

    Ritchie (09-17-2008)

  7. #5
    Join Date
    Sep 2008
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Got you now! Of course!
    Thanks guys!

Bookmarks

Posting Permissions

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