Topic: XML not found

Hello guys. I need a gallery with different categories in my website, since SimpleViewer doesn't support that I tried to do different galleries. So I've put one in a folder like site/gallery1/ the problem is that then I need to change the import script to

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" [b][u]src="gallery1/svcore/js/simpleviewer.js"></script> // change here to gallery1 as main.
<script type="text/javascript">
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "600", "600", "FFFFFF", true);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

but if I do that then the imported script says that it can't find the Gallery XML.


I found out that I need to put
fo.addVariable("xmlDataPath", "gallery1/gallery.xml"); ... in the code, but in which line of the embed code do I need to put it? Cause I can't figure it out, I tried it in multiple ways but still it says that it can't find the xml.

Last edited by Eidmantas (2011-08-14 12:05:56)

Re: XML not found

fo.addVariable("xmlDataPath", "gallery1/gallery.xml");

The line above is for previous versions of swfobject (used to embed SimpleViewer) and SimpleViewer and should not be used: 'fo.addVariable' is for swfobject prior to v2 and 'xmlDataPath' is for SimpleViewer prior to v2.

If you have each gallery in a separate folder, eg. 'gallery1', 'gallery2', etc., then use the baseURL method to embed each gallery: http://simpleviewer.net/simpleviewer/su … l#external

Your embedding code for 'gallery1' would look something like this:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="gallery1/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.baseURL = "gallery1/";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "600", "600", "FFFFFF", true, flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->
Steven Speirs
SimpleViewer Support Team.

Re: XML not found

Thanks. It seems to work fine now, but still there's one problem. It doesn't work on IE (it works fine on Firefox..etc), what could be the problem? (The web is here.)

Re: XML not found

Your gallery displays OK in IE9 on my PC.
Try clearing your browser's cache before reloading the gallery.
Also, you could try validating your page with the W3C Markup Validation Service and fix any errors reported.

Steven Speirs
SimpleViewer Support Team.