0

I am using ImageFlow 9. I have an ImageFlow scroller script added in the Iframe. I want to have the images opened outside the iframe that is on the Parent page. Right now it is opening the images in the Iframe itself. What changes should I do and in which file?

There is a .js file that has a function as below -

image.onclick = function() { document.location = this.url; }   

Do I need to make the changes here or in the actual script that uses this code-

<img src="reflect.php?img=img/large1.jpg" longdesc="javascript:myLightbox.start('img/large1.jpg|Image 1');" alt="Image 1" />
Abhiram
  • 1
  • 1

1 Answers1

0

Create a JavaScript function on the parent page, and call that from the iFrame.

Something like

function openImage(url){
    // do your image handling stuff here
}

From the iFrame call the function:

parent.openImage(url);

ps: I recommend not using iFrames at all unless there is no other way (which most of the time is not the case)

Rene Pot
  • 24,681
  • 7
  • 68
  • 92