2011-09-28 53 views
0

我正在使用ImageFlow 9.我在Iframe中添加了一个ImageFlow Scroller脚本。我想让图像在父页面上的iframe之外打开。现在它正在打开Iframe中的图像。我应该做什么和在哪个文件中进行更改?Image Flow和Iframe

有是具有如下功能的.js文件 -

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

我需要在这里进行更改或实际脚本使用此代码 -

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

回答

0

创建父页面上的JavaScript函数,并从iFrame中调用该函数。

喜欢的东西

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

从iFrame中调用该函数:

parent.openImage(url); 

PS:我不建议在所有除非没有别的办法(其中大部分时间是不使用的iFrame案例)