Topic: Thank you Steven

I wanted to use this forum as I had a query about embedding simple viewer in my website. Due to a problem with the forums back end I was unable to register. A mail to support was promptly answered by 'Steven' saying he'd informed the department involved and asked if he could help me further. (NOW THIS WAS ON A SATURDAY AT 11PM!) smile

The problem was getting my gallery to display on mobile devices.
I explained that I was using an iframe as a work around but was not sure why the mobile could not find the XML without the iframe?
My code WAS THIS

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="http://www.XYZ/pictures_reports_2013/pictures/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.baseURL = "http://www.XYZ/pictures_reports_2013/pictures/";
flashvars.galleryURL = "http://www.XYZ/pictures_reports_2013/pi … allery.xml";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "100%", "800", "222222", true, flashvars, null, null, null, false);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

Here is his reply (it may help you too)

Your Mobile Player gallery displays fine if you go to:
http://www.XYZ/pictures_reports_2013/game.htm
... but not if you go to:
http://XYZ.com/pictures_reports_2013/game.htm

This is because you have used absolute paths in your gallery's embedding code which use the 'www' subdomain.
All gallery files must be on the same domain (or subdomain) as the HTML page containing the gallery's embedding code due to the JavaScript same-origin policy: https://developer.mozilla.org/en-US/doc … JavaScript

This is the corrected code which he mailed to me

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="pictures/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.baseURL = "pictures/";
flashvars.galleryURL = "gallery.xml";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "100%", "800", "222222", true, flashvars, null, null, null, false);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

he added ''Actually, as long as your gallery's XML file is named 'gallery.xml' and is located directly inside the gallery folder (designated by the baseURL), there is no need to use a galleryURL at all and you can safely remove the galleryURL line from your gallery's embedding code.''
I've left it in there as I'm a lazy... smile


Thank you Steven for helping me sort this out and that during WEEKEND HOURS
Excelent service!
STUart

Re: Thank you Steven

You're very welcome!
And thank you for taking the time to make this post which may, indeed, help other users.

Steven Speirs
SimpleViewer Support Team.