Topic: Multiple viewers on same html page

Multiple viewers on same html page

Hi,
Can this be done?
Thanks

Last edited by petem (2011-07-04 13:12:24)

Re: Multiple viewers on same html page

Yes. You can embed multiple viewers on the same HTML page by using the appropriate embedding code for each viewer and ensuring that the relevant files are all in their correct locations.
AutoViewer: http://simpleviewer.net/autoviewer/supp … dding.html
PostcardViewer: http://simpleviewer.net/postcardviewer/ … dding.html
SimpleViewer: http://simpleviewer.net/simpleviewer/su … html#embed
TiltViewer: http://simpleviewer.net/tiltviewer/supp … dding.html
Make sure that each viewer is embedded into a <div> of a different name.

Steven Speirs
SimpleViewer Support Team.

Re: Multiple viewers on same html page

Thanks,
I tried this before and this does not seem to work. I must be misinterpreting something.
Below is what I have on a single web doc. It always loads the second sv  it in the first sv call. The second does not load at all.
Any ideas?

First sv

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="http://www.lcrmconstruction.com/homepage/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.baseURL = "http://www.lcrmconstruction.com/homepage/";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "300", "225", "transparent", true, flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

second sv

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="http://www.lcrmconstruction.com/residential/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.baseURL = "http://www.lcrmconstruction.com/residential/";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "386", "600", "transparent", true, flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

Re: Multiple viewers on same html page

You can disregard most of my previous post. I thought you were trying to embed different viewers (eg. AutoViewer, SimpleViewer, etc.) rather than galleries on the same HTML page.
See the section entitled Multiple Galleries on One HTML Page here: http://simpleviewer.net/simpleviewer/su … l#multiple

Essentially, you have two <div>s with the same 'id' and both galleries are being embedded into the same <div>. Only the most recent gallery being embedded into the last <div> given the duplicate 'id' will be visible.
Try the following code:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="http://www.lcrmconstruction.com/homepage/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.baseURL = "http://www.lcrmconstruction.com/homepage/";
simpleviewer.ready(function () {
simpleviewer.load("sv-container1", "300", "225", "transparent", true, flashvars);
});
</script>
<div id="sv-container1"></div>
<!-- END SIMPLEVIEWER EMBED -->

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="http://www.lcrmconstruction.com/residential/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.baseURL = "http://www.lcrmconstruction.com/residential/";
simpleviewer.ready(function () {
simpleviewer.load("sv-container2", "386", "600", "transparent", true, flashvars);
});
</script>
<div id="sv-container2"></div>
<!-- END SIMPLEVIEWER EMBED -->
Steven Speirs
SimpleViewer Support Team.

Re: Multiple viewers on same html page

Thanks again,
Very close. It actually provides an excellent and useable effect.
sv-container2 loads properly while sv-container1 loads the thumbnails of sv-container2.
Not what I wished for but looks great.

See http://lcrmconstruction.com/residential … llery.html

Any other ideas on how to display unique sv-containers would be helpful.
Thanks,
Pete

Re: Multiple viewers on same html page

Create different variable names for your flashvars in each block of embedding code:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="http://www.lcrmconstruction.com/homepage/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars1 = {};
flashvars1.baseURL = "http://www.lcrmconstruction.com/homepage/";
simpleviewer.ready(function () {
simpleviewer.load("sv-container1", "300", "225", "transparent", true, flashvars1);
});
</script>
<div id="sv-container1"></div>
<!-- END SIMPLEVIEWER EMBED -->

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="http://www.lcrmconstruction.com/residential/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars2 = {};
flashvars2.baseURL = "http://www.lcrmconstruction.com/residential/";
simpleviewer.ready(function () {
simpleviewer.load("sv-container2", "386", "600", "transparent", true, flashvars2);
});
</script>
<div id="sv-container2"></div>
<!-- END SIMPLEVIEWER EMBED -->
Steven Speirs
SimpleViewer Support Team.

Re: Multiple viewers on same html page

Perfect!
Thanks,
Pete