Iframe Issues

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PezQueen
    New Member
    • Dec 2007
    • 2

    Iframe Issues

    Hi There,


    I'm a complete newcomer to javascript/programming so I'm having a little trouble with this one.

    I have a website at www.alisonhedley.co.uk.

    At present it's all working Ok - but what I want to do is:

    when the main image is clicked, I want it to appear full-size (full screen), in the same window.
    preferably with the window greyed-out in the background.

    The thumbnails open up images and descriptions in an Iframe.

    Consequently, using an imageswap OnMouseOver makes the larger image appear, but it's cut off by the bottom of the Iframe.

    Is it possible to use OnMouseOver to open up the full-size image outside of the Iframe?

    hope that's not a terrible description.

    cheers guys.
  • Freaky Chris
    New Member
    • Dec 2007
    • 24

    #2
    Hopefully im not missing the point here. OK here goes,

    Firstly i would use a div as my method of displaying the image. Set up a div tag that is positioned absolutely in the center of the screen at the desired size, set its z-index to something like 999 to ensure it remains on top and set its visiblity to hidden. Also on the div place an image (just plain) as a place holder.

    Once you have done that then you can use a javascript to change the visiblity of the div tag and dynamically update the image scr throught document.getEle mentById().

    Also i would use a javascript function applied to the full sized image on the div tag as a hyperlink that returns void(0); but allows you to rehide the div tag.

    Hope this help you

    Chris

    Comment

    • PezQueen
      New Member
      • Dec 2007
      • 2

      #3
      Hi Chris, thanks for the speedy reply!

      That all sounds a bit complicated.. I'll see if I can get my tired brain cells around it!

      Comment

      • Freaky Chris
        New Member
        • Dec 2007
        • 24

        #4
        Thats not a problem, if you are still having problems after looking into it further then feel free to PM me and ill try to help you out.

        Also im sure another suggestion will be made before long as another solution which you may want to look into if someone does post another suggestion.

        Chris

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          I can't seem to see the images.

          You can show the images outside the iframe if the iframe is from the same domain as the main page.

          Comment

          Working...