Topic: Help embedding Simple Viewer in existing html

I tried using the embed code from SV Builder - here it is:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
$(document).ready(function () {
SV.simpleviewer.load("sv-container", "100%", "100%", "000000", true);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

and the code appears on my website instead of the gallery: http://www.smartslope.com/applications/index.html

i followed these instructions:

To embed your gallery in an existing HTML page:

Use svBuilder to create your SimpleViewer gallery.
Copy the entire contents of your SimpleViewer gallery folder into the folder that contains your HTML page (to embed with a separate external gallery folder, check here).
In svBuilder, go to the Publish panel and copy the provided Embed Code. The embed code will look something like this:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
$(document).ready(function () {
SV.simpleviewer.load("sv-container", "100%", "100%", "222222", true);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

Paste the provided code into the body of the HTML page where you want to the gallery to appear.
Load the HTML page in a browser to preview your gallery.


what am i doing wrong?

Re: Help embedding Simple Viewer in existing html

Somehow, the XML character entities have been escaped (perhaps during upload?).
As an example, what should be:

<script type="text/javascript">

... looks like this in your webpage:

&lt;script type=&quot;text/javascript&quot;&gt;

I don't know whether this is being done by your FTP client or your server but it is the cause of the issue.

Steven Speirs
SimpleViewer Support Team.

Re: Help embedding Simple Viewer in existing html

i'm using cyberduck. how is this issue resolved? i'm not a skilled code writer, just a designer with an ounce of web design experience.

Re: Help embedding Simple Viewer in existing html

Just a thought... how did you paste the code?
I suspect the XML character entities might have been escaped during a paste in web design software or an HTML editor.
Open up your HTML file in a plain text editor and try pasting the code again.

Steven Speirs
SimpleViewer Support Team.

Re: Help embedding Simple Viewer in existing html

i copied and pasted the code in dreamweaver. i deleted all the bold scripts so the code now looks like this:

!--START SIMPLEVIEWER EMBED.--<br />
script type=text/javascript src=svcore/js/simpleviewer.js/script<br />
script type=text/javascript<br />
$(document).ready(function () {<br />
SV.simpleviewer.load(sv-container, 100%,100%, 000000, true);<br />
});<br />
/script<br />
div id=sv-container/div<br />
!-- END SIMPLEVIEWER EMBED --<br />
<br />

Re: Help embedding Simple Viewer in existing html

That won't work. All the original < and > have disappeared and you now have HTML line breaks at the end of each line as if the code were just text.

Grab fresh code from svBuilder, open your HTML file in a plain text editor and paste the code in there.

Steven Speirs
SimpleViewer Support Team.

Re: Help embedding Simple Viewer in existing html

Maybe you are pasting in 'Design' view. You need to paste in 'Code' view.

Felix Turner
SimpleViewer Support Team.

Re: Help embedding Simple Viewer in existing html

HI I am having the same problem, pasted svBuilder code into Notepad and pasted into my Dreamweaver code, but all I see in the preview is a tiny image icon in the upper left corner. I feel like there is a step I am missing as far as folder paths.

Thanks