How to open Shadowbox from within an iframe?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to open Shadowbox from within an iframe?

renevdb
Hello there,

I love the Shadowbox effect but can't get it to work from within an iframe.
The thumbnails with the rel=shadowbox are on a page that opens in an iframe. If I click on the thumbnail, the image just opens in the iframe without the shadowbox effect.
With lytebox I can get it to work, but I like shadowbox much more.

Thanks a lot for anyone willing to help me out here!

Reply | Threaded
Open this post in threaded view
|

Re: How to open Shadowbox from within an iframe?

Sylvia_
It should work if you place all the shadowbox javascript code (and the call to your framework javascript) in the document that is opened in the iframe.
So don't place the shadowbox code in the page that opens the iframe but in the page that has the thumbnails.
If it still doesn't work and you have Firefox, I recommend downloading the Firebug plugin, which shows JavaScript errors and check if there are any errors or warnings.
Reply | Threaded
Open this post in threaded view
|

Re: How to open Shadowbox from within an iframe?

renevdb
Hi Sylvia,

Thanks very much for your kind reply, sorry i haven't answered earlier, been busy with other stuff.

I still can't get it to work, and firebug doesn't help me any further. I must admitt that javascript is total Chinese to me (I'm just an enthousiast, no pro at all) so far I managed with 'googeling' around.

If you want to see what the problem is please check www.yishi.nl and click the foto's button. The images are shown with Lytebox and it works like a charm. if you open www.yishi.nl/index_nieuw.html and click the foto's button, the images will open with shadowbox (and in the iframe, not full screen).

I hope you, or someone else, can point me in the right direction. I just really like the shadowbox lay-out.

Thanks a lot!

Regards, René, Holland
Reply | Threaded
Open this post in threaded view
|

Re: How to open Shadowbox from within an iframe?

Wizzud
Shadowbox is not built to run within a frame, whereas lytebox is.
It's probably possible to get it to run in the top window, on elements within the frame window, using custom scripting (in both windows) and Shadowbox.open(). But to get gallery functionality as well would need DOM injection in the top window and a more complex script.

Alternatively, update the shadowbox script to add in-frame capability!
Combine literacy with curiosity and a whole world of information opens up to you