Topic: SimpleViewer Gallery doesn't load

Hi,

I'm setting the SimpleViewer Gallery in a website and it doesn't load in Google Chrome.

Can anyone help?

Here's the link:

http://myrianlima.eu/_galerias/Cables/t … ables.html

Re: SimpleViewer Gallery doesn't load

Try removing line 6, <script type="text/javascript" src="svcore/js/swfobject.js" "svcore/js/simpleviewer.js"> from your HTML and clearing your browser's cache

Mike Richards
SimpleViewer Support Team.

Re: SimpleViewer Gallery doesn't load

It doesn't work. Not even in IE.

In IE I'm getting the following error

Line: 41
Char: 1
Error: Object expected
Code: 0
URL: http://myrianlima.eu/_galerias/Cables/t … ables.html

Re: SimpleViewer Gallery doesn't load

Try the following:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>
      Myrian Lima Diseño de Joyas
    </title>
    <script type="text/javascript">
        //<![CDATA[

        function MM_preloadImages() { //v3.0
            var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
            var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
            if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
        }

        function MM_swapImgRestore() { //v3.0
            var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
        }

        function MM_findObj(n, d) { //v4.01
            var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
            d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
            if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
            for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
            if(!x && d.getElementById) x=d.getElementById(n); return x;
        }

        function MM_swapImage() { //v3.0
            var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
            if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
        }


        //]]>
    </script>
    <style type="text/css">
        /*<![CDATA[*/
        .galeria_sv {
            width: 722px;
            height: 440px;
        }
        /*]]>*/
    </style>
  </head>
  <body onload= "MM_preloadImages('../../menu_biografia-186x222.gif','../../menu_trabajos-186x222.gif','../../menu_tienda-186x222.gif','../../menu_enlaces-186x222.gif','../../menu_contacto-186x222.gif','../../menu_videos-186x222.gif','../../trab_chillida-242x322.gif','../../trab_cables-242x322.gif','../../trab_paisajes-242x322.gif','../../trab_pau_brasil-242x322.gif','../../trab_unique-242x322.gif','../../trab_texturas-242x322.gif','../../trab_havaianas-242x322.gif','../../trab_oro-242x322.gif','../../trab_nuevas-242x322.gif')">
  <table width="1200" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td colspan="4">
          <a href="../../index.html"><img src="../../barra_superior-1070x169.gif" alt="cabeçalho" width="1070" height="169" border="0" /></a>
        </td>
      </tr>
      <tr>
        <td width="186" height="443">
          <p>
            <img src="../../menu_trabajos-186x222.gif" alt="menu_cast" name="menu_cast" width="186" height="222" border="0" usemap="#Map2" id="menu_cast" />
          </p>
          <p>
             
          </p>
          <p>
             
          </p>
          <p>
             
          </p>
        </td>
        <td width="50" rowspan="2">
          <img src="../../barra_vertical35x704.gif" width="35" height="462" alt="barra_vertical" />
        </td>
        <td width="242">
          <p>
             
          </p>
          <p>
             
          </p>
          <p>
            <img src="../../trab_cables-242x322.gif" alt="menu_cables" name="menu_trabajos" width="242" height="322" border="0" usemap="#Map3" id="menu_trabajos" />
          </p>
        </td>
        <td width="722">
            <!--START SIMPLEVIEWER EMBED.-->
            <script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
            <script type="text/javascript">
                //<![CDATA[
                $(document).ready(function () {
                    SV.simpleviewer.load("sv-container", "100%", "100%", "FFFFFF", true);
                });
                //]]>
            </script>
            <div class="galeria_sv" id="sv-container"></div>
            <!-- END SIMPLEVIEWER EMBED -->
        </td>
      </tr>
      <tr>
        <td>           
        </td>
        <td colspan="2">
          <img src="../../barra_inferior-851x54.gif" alt="barra_inferior" width="851" height="54" border="0" usemap="#Map" />
        </td>
      </tr>
    </table>
    <map name="Map" id="Map">
      <area shape="rect" coords="617,6,643,28" href="#" alt="" />
      <area shape="rect" coords="655,5,680,28" href="#" alt="" />
      <area shape="rect" coords="693,2,714,28" href="#" alt="" />
      <area shape="rect" coords="730,4,752,26" href="#" alt="" />
      <area shape="rect" coords="32,13,60,24" href="#" alt="" />
      <area shape="rect" coords="64,12,102,25" href="#" alt="" />
      <area shape="rect" coords="107,14,143,26" href="#" alt="" />
      <area shape="rect" coords="147,14,203,25" href="#" alt="" />
      <area shape="rect" coords="207,13,246,25" href="#" alt="" />
      <area shape="rect" coords="249,12,287,25" href="#" alt="" />
      <area shape="rect" coords="290,12,344,25" href="#" alt="" />
      <area shape="rect" coords="347,13,390,26" href="#" alt="" />
      <area shape="rect" coords="393,12,423,28" href="#" alt="" />
      <area shape="rect" coords="427,14,492,25" href="#" alt="" />
      <area shape="rect" coords="495,12,603,26" href="#" alt="" />
    </map>
    <map name="Map2" id="Map2">
      <area shape="rect" coords="80,10,176,34" href="../../biografia_cast.html" onmouseover="MM_swapImage('menu_cast','','../../menu_biografia-186x222.gif',1)" onmouseout="MM_swapImgRestore()" alt="" />
      <area shape="rect" coords="85,47,176,71" href="../Chillida/trabajos_chillida.html" onmouseover="MM_swapImage('menu_cast','','../../menu_trabajos-186x222.gif',1)" onmouseout="MM_swapImgRestore()" alt="" />
      <area shape="rect" coords="41,81,179,109" href="../../tiendaonline_cast.html" onmouseover="MM_swapImage('menu_cast','','../../menu_tienda-186x222.gif',1)" onmouseout="MM_swapImgRestore()" alt="" />
      <area shape="rect" coords="92,119,178,142" href="../../enlaces_cast.html" onmouseover="MM_swapImage('menu_cast','','../../menu_enlaces-186x222.gif',1)" onmouseout="MM_swapImgRestore()" alt="" />
      <area shape="rect" coords="80,152,178,178" href="../../contacto_cast.html" onmouseover="MM_swapImage('menu_cast','','../../menu_contacto-186x222.gif',1)" onmouseout="MM_swapImgRestore()" alt="" />
      <area shape="rect" coords="103,188,176,215" href="../../videos_cast.html" onmouseover="MM_swapImage('menu_cast','','../../menu_videos-186x222.gif',1)" onmouseout="MM_swapImgRestore()" alt="" />
    </map>
    <map name="Map3" id="Map3">
      <area shape="rect" coords="16,9,98,34" href="../Chillida/trabajos_chillida.html" onmouseover="MM_swapImage('menu_trabajos','','../../trab_chillida-242x322.gif',1)" onmouseout="MM_swapImgRestore()" alt="" />
      <area shape="rect" coords="18,45,96,72" href="trabajos_cables.html" onmouseover="MM_swapImage('menu_trabajos','','../../trab_cables-242x322.gif',1)" onmouseout="MM_swapImgRestore()" alt="" />
      <area shape="rect" coords="18,80,112,110" href="../Paisajes/trabajos_paisajes.html" onmouseover="MM_swapImage('menu_trabajos','','../../trab_paisajes-242x322.gif',1)" onmouseout="MM_swapImgRestore()" alt="" />
      <area shape="rect" coords="19,119,127,141" href="../Pau_Brasil/trabajos_pau_brasil.html" onmouseover="MM_swapImage('menu_trabajos','','../../trab_pau_brasil-242x322.gif',1)" onmouseout="MM_swapImgRestore()" alt="" />
      <area shape="rect" coords="22,152,89,181" href="../Unique/trabajos_unique.html" onmouseover="MM_swapImage('menu_trabajos','','../../trab_unique-242x322.gif',1)" onmouseout="MM_swapImgRestore()" alt="" />
      <area shape="rect" coords="22,187,112,215" href="../Texturas/trabajos_texturas.html" onmouseover="MM_swapImage('menu_trabajos','','../../trab_texturas-242x322.gif',1)" onmouseout="MM_swapImgRestore()" alt="" />
      <area shape="rect" coords="18,223,129,251" href="../Havaianas/trabajos_havaianas.html" onmouseover="MM_swapImage('menu_trabajos','','../../trab_havaianas-242x322.gif',1)" onmouseout="MM_swapImgRestore()" alt="" />
      <area shape="rect" coords="19,259,63,282" href="../Oro/trabajos_oro.html" onmouseover="MM_swapImage('menu_trabajos','','../../trab_oro-242x322.gif',1)" onmouseout="MM_swapImgRestore()" alt="" />
      <area shape="rect" coords="18,292,98,316" href="../new_collection/trabajos_nuevas.html" onmouseover="MM_swapImage('menu_trabajos','','../../trab_nuevas-242x322.gif',1)" onmouseout="MM_swapImgRestore()" alt="" />
    </map>
  </body>
</html>
Mike Richards
SimpleViewer Support Team.

Re: SimpleViewer Gallery doesn't load

Well, I tried, but the problem persists.
There's no message about javascript error ("Object expected") in IE anymore. But the gallery still doesn't show up.
It's weird, since I have done everything correctly (according to the SimpleViewer Embedding Guide)!

Re: SimpleViewer Gallery doesn't load

If you temporarily remove the javascript in the head of your HTML and the onload in your body tag does it work? Don't forget to clear your browser's cache after making the change.

    <script type="text/javascript">
        //<![CDATA[
        function MM_preloadImages() { //v3.0
            var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
            var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
            if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
        }

        function MM_swapImgRestore() { //v3.0
            var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
        }

        function MM_findObj(n, d) { //v4.01
            var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
            d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
            if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
            for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
            if(!x && d.getElementById) x=d.getElementById(n); return x;
        }

        function MM_swapImage() { //v3.0
            var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
            if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
        }
        //]]>
    </script>
onload= "MM_preloadImages('../../menu_biografia-186x222.gif','../../menu_trabajos-186x222.gif','../../menu_tienda-186x222.gif','../../menu_enlaces-186x222.gif','../../menu_contacto-186x222.gif','../../menu_videos-186x222.gif','../../trab_chillida-242x322.gif','../../trab_cables-242x322.gif','../../trab_paisajes-242x322.gif','../../trab_pau_brasil-242x322.gif','../../trab_unique-242x322.gif','../../trab_texturas-242x322.gif','../../trab_havaianas-242x322.gif','../../trab_oro-242x322.gif','../../trab_nuevas-242x322.gif')"
Mike Richards
SimpleViewer Support Team.