Topic: How to embed galleries in Spry Panels using Iframe?

Hey,

I'm trying to embed two 'SimpleViewer' photo galleries into a spry tabbed panel using <iframe>. The first gallery displays fine within the first tab content region, but the second gallery fails to appear in the second tab content region ... I've tested the functionality of the spry panels by replacing the iframes with text content: it works fine. I've tested the functionality of the iframes by embedding one after another in a single HTML page: it works fine. But the two things seem to cause problems when combined.

Here is a link to the page in question:

http://annicaneumuller.com/Gallery/collections.htm

Is there a workaround for this?
Any help would be much appreciated!

Re: How to embed galleries in Spry Panels using Iframe?

As the galleries are in separate folders, you could try replacing the <iframe> embedding code with the baseURL embedding code as documented here: http://simpleviewer.net/simpleviewer/su … l#external
Give your 'flashvars' variable a unique name for each gallery's embedding code and embed each gallery into a container with a unique name.
For example, the code for your first gallery would look like this:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="/svmanager/g3/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars1 = {};
flashvars1.baseURL = "/svmanager/g3/";
simpleviewer.ready(function () {
simpleviewer.load("sv-container1", "100%", "100%", "222222", true, flashvars1);
});
</script>
<div id="sv-container1"></div>
<!-- END SIMPLEVIEWER EMBED -->

... and the code for your second gallery would look like this:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="/svmanager/g4/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars2 = {};
flashvars2.baseURL = "/svmanager/g4/";
simpleviewer.ready(function () {
simpleviewer.load("sv-container2", "100%", "100%", "222222", true, flashvars2);
});
</script>
<div id="sv-container2"></div>
<!-- END SIMPLEVIEWER EMBED -->
Steven Speirs
SimpleViewer Support Team.

Re: How to embed galleries in Spry Panels using Iframe?

Hi, thanks for getting back to me so quickly ...

The problem is, I've made the website for a friend who isn't particularly good with computers, so she'll be using SurrealCMS to embed future galleries on the collections page. She needs to be able to embed these galleries graphically, without touching (even copy and pasting) any code.

The Iframe embed feature of the CMS allows her to embed galleries very easily, so what I really need is a workaround to get spry and iframe to play nicely with one another. Or at least to understand what's going on between them so that I can lay the matter to rest in my mind ...

Re: How to embed galleries in Spry Panels using Iframe?

My suggestion of replacing the <iframe> with the baseURL embedding code should work fine (although I realise it is not suitable for your scenario).
It works for both posters who use Spry Tabbed Panels in this thread.
I notice that your workaround of targeting an <iframe> with each gallery works well.
Perhaps searching or posting in the Spry forum would help further.

Steven Speirs
SimpleViewer Support Team.