Error with shadowbox S[p] is not a constructor

8 messages Options
Embed this post
Permalink
Colin

Error with shadowbox S[p] is not a constructor

Reply Threaded More More options
Print post
Permalink
Hi

Has anyone see this error before? I have done a basic installation but cannot get it to work.
When I click on a configured link the background greys out then I get the error.

Error: S[p] is not a constructor
Source File: shadowbox.js
Line: 1

Thanks
Colin
Sjoerd

Re: Error with shadowbox S[p] is not a constructor

Reply Threaded More More options
Print post
Permalink
I have the same issue. It seems like it's a problem with the selected player, but i don't know exactly what's wrong.
nik_one

Re: Error with shadowbox S[p] is not a constructor

Reply Threaded More More options
Print post
Permalink
I have the same problem.
I 'm using shadowbox with jquery and swfobject.
Here is my code:

        <link rel="stylesheet" type="text/css" href="inc/shadowbox.css">
        <script type="text/javascript" src="inc/swfobject.js"></script>
        <script type="text/javascript" src="inc/jquery.js"></script>
        <script type="text/javascript" src="inc/shadowbox.js"></script>

        <script type="text/javascript">
                $(document).ready(function(){
                    var options = {
                        resizeLgImages:     true, loadingImage: "images/loading.gif",
                        displayNav:         true, handleUnsupported:  'remove',
                        keysClose:          ['c', 27], // c or esc
                        autoplayMovies:     false
                    };
                    Shadowbox.init(options);
                });
               
                function abrirSB(type, title, url)
                         {
                             Shadowbox.init({skipSetup: true});
                             Shadowbox.open({type: type, title: title, content: url, gallery: "hotel"});
                };
        </script>
tobi

Re: Error with shadowbox S[p] is not a constructor

Reply Threaded More More options
Print post
Permalink
I had the same error when opening html pages in shadowbox and found this post:
http://www.shadowbox-js.com/forum.html#nabble-td1335760

My solution was quite similar. In addition to the "html" player I also added the "iframe" player to the init() method and got rid of this error:

<script type="text/javascript">
  Shadowbox.init({players:["img","html","iframe"]})
</script>

I´m working with shadowbox-build-3.0b. Would be cool to have this documented somewhere in the usage section.

Cheers, Tobi
Fred

Re: Error with shadowbox S[p] is not a constructor

Reply Threaded More More options
Print post
Permalink
Hi

I'm facing the same issue, but with a link from a Flash slideshow.

The link in flash are set up with this code :
javascript:show('images/banners/slideshow/fullsize/24.jpg','');

as described in another thread.


I added this code in my HTML file :
  <script type="text/javascript">
        Shadowbox.init({
    players: ['iframe', 'img']
    });
        </script>  
<script type="text/javascript">
    function show(url,label) {
    Shadowbox.open(
    {
    title: label,
    type: 'img',
    content: url,
    });
    }</script>

Shadowbox is called porperly, as the grey overlay appears, but the box itslef is not displayed.

The following javascript error occurs :
S[p] is not a constructor


On click on other HTML links calling shadowbox, everything works fine.
when I try to add the "javascrit: ...." link in any HTML  tag, the result is the same as it's with the flash link, so I assume the problem comes from the JS and not from Flash.

Note that the error occurs even when I change the type attribute (html, iframe, ...) in the show function.

I'm working with the latest shadowbox version, downloaded a few hours ago.

Can anyone help me to solve this ? Thanks in advance !
Fred

Re: Error with shadowbox S[p] is not a constructor

Reply Threaded More More options
Print post
Permalink
Any clue on a fix for this issue ?

Thanks !
Wizzud

Re: Error with shadowbox S[p] is not a constructor

Reply Threaded More More options
Print post
Permalink
In reply to this post by Fred
Shadowbox.open(
    {
    title: label,
    player: 'img',
    content: url,
    });
Combine literacy with curiosity and a whole world of information opens up to you
Fred

Re: Error with shadowbox S[p] is not a constructor

Reply Threaded More More options
Print post
Permalink
It's working fine...Thank you so much !