Topic: adding gallery to my site

So i made a gallery, and added the html into my site but when i click the button to view the gallery it opens in a new link how can i make stay in my site?

Re: adding gallery to my site

Do you want to embed a gallery in a web page? If so, instructions can be found here.

If you want to load a gallery into a web page on demand (when a user clicks a link), then you could do so using code such as the following:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title>SimpleViewer-Pro Gallery</title>
    <script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
    <script type="text/javascript">
        function loadGallery() {
            simpleviewer.ready(function () {
                simpleviewer.load('sv-container', '600', '400', '222222', true);
            });
        }
    </script>
</head>
<body>
    <div id="link"><a href="#" onclick="javascript: loadGallery();">Click here to load gallery</a></div>
    <div id="sv-container"></div>
</body>
</html>

You could also show or hide a gallery on demand by using the SimpleViewer-Pro API method show( show: Boolean ).

Steven Speirs
SimpleViewer Support Team.

Re: adding gallery to my site

Ill try it but just a heads up im not the sharpest when it comes to Html.... hmm

Re: adding gallery to my site

Couldent get it to work. I get SimpleViewer does not display locally in Google Chrome... perhaps i could upload my page and maybe could walk me through  where to place the code?

Last edited by Pr0ph3cy (2014-02-27 14:58:01)

Re: adding gallery to my site

If you are trying to load a single gallery into your web page on demand from a link within the same page, then:
(1) Put the following code into the <head> section of your web page:

<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
    function loadGallery() {
        simpleviewer.ready(function () {
            simpleviewer.load('sv-container', '600', '400', '222222', true);
        });
    }
</script>

(2) Put the following code into the <body> section of your web page where you want the gallery to appear:

<div id="sv-container"></div>

(3) Use a link such as the following wherever you like in the <body> section of your web page to fire the loadGallery() function and load the gallery:

<a href="#" onclick="javascript: loadGallery();">Click here to load gallery</a>
Steven Speirs
SimpleViewer Support Team.