Search…

X3 Photo Gallery Support Forums

Search…
 
mc007ibi
Topic Author
Posts: 6
Joined: 23 Aug 2011, 08:52

iframe onLoad not fired

25 Aug 2011, 04:00

Hi,

We have to run the flash gallery in an iFrame. the onLoad event is fired once only due the first start up. Is there anything we can do about ? In HTML mode it works fine so far. I also tried a timed loop which is getting the dom src property but same result.

Thanks a lot.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: iframe onLoad not fired

25 Aug 2011, 05:25

What onLoad do you mean? the onload for the frame? I am not sure what you are trying to do, but this isn't triggered or controlled by Imagevue in any way of course ... Why it doesn't trigger for your frame I am not sure unfortunately. Maybe you are referring the javascript incorrectly?
 
mc007ibi
Topic Author
Posts: 6
Joined: 23 Aug 2011, 08:52

Re: iframe onLoad not fired

25 Aug 2011, 05:57

Hi,

thanks for your quick response ! I like it.
This is how I declared my iFrame :

<iframe id="gallery<%=locId%>" src="<%=galleryPath %>"
width="100%"
height="405px scrolling="no"
frameborder="0"
onLoad="galleryChanged(this.contentWindow.location);">

The galleryChanged function works properly in HTML mode. I am also using the new and untouched embed_example.html file for the src attribute. I also looked in swObject and swAdress source files. It seems they do all their job properly but I am not sure. Somewhere I saw that I can pass a parameter to disable swAdress. Could it help me ?

Thanks again. I am a bit lost about this.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: iframe onLoad not fired

26 Aug 2011, 02:46

Code
onLoad="galleryChanged(this.contentWindow.location);"
The above unfortunately I know nothing of, if it should work or not, or about the javascript function it is trying to run. It is certainly 100% unrelated to the existence of Imagevue in the document, so its a bit hard for me to diagnose.
mc007ibi wrote:The galleryChanged function works properly in HTML mode.
You mean when you load the html gallery into an iframe? The SWF gallery is still embedded into a html page in terms of having a javascript onload function ...
mc007ibi wrote:I also looked in swObject and swAdress source files. It seems they do all their job properly but I am not sure. Somewhere I saw that I can pass a parameter to disable swAdress. Could it help me ?

I am not sure how these are related to your onload function. SWFObject is required simply for embedding the SWF file, and if you disable it, the SWF won't load at all. You can disable the SWFAddress from Imagevue settings, but this is not related to "load" in any way ... Its for settings an #Address in the URL field of your browser.

In Imagevue, we use jQuery for onLoad events. We have code like this:
Code
<script type="text/javascript">
	// <![CDATA[
		$(window).load(function () {
			// Stuff to run on document load goes here ...
		});
	// ]]>
</script>
You would need to add that to the document that loads in the iframe, or maybe add to your custom document and target the iframe instead (I am not sure exactly how, but a few searches may help you).