2

My whole site has one index page in which are loaded iFrames. I have thumbnails of pictures in a very long iFrame, when using lightbox to display a bigger image of a thumbnail, lightbox opens at the very top of the iFrame.

I already have a script in the parent window to resize the height of the iframes according to the length of the pages loaded inside the iFrame, I have never managed to open a lightbox in the parent window by calling the parent through a script, I guess due to this already existing script :

<script>
function resizeIframe(obj) {
       {   obj.style.height = 0; };
        { obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';}
  }</script>

and the onload on the iframe links

<iframe src="discog.html" name="iframeContenu" width="100%" height="100%" 
scrolling="no"  frameborder="0" id="iframeContenu" 
onload="javascript:resizeIframe(this);"></iframe>

Is it possible to have the lightbox image displayed at the level of the viewport, ie where the thumbnail is clicked, rather than at the top of the iframe ?

0 Answers0