Advertisement

09.20.2008 at 07:01AM PDT, ID: 23748218 | Points: 500
[x]
Attachment Details

Shadowbox:  Works for me in "rel", can't get it to go with .open()

Asked by Ned2 in JavaScript

Tags: ,

I've got Shadowbox working nicely in other parts of this application.  Works with Motion Gallery.

Now I'm trying use it with a call to .Open, and that I have trouble with.

All the code below in the Head section is the same stuff I'm using in other areas of the same app, where it works.

Neither the html case nor the img one work.  Don't get an error.  The text before and after the scripts is displayed.

Someone's going to point this out--I _know_ the html case is commented out right now.   Trouble is the behavior's the same when it isn't.

Shadowbox 2.0
Django 1.0

Thanks for looking at this.

Ned


Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
<!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" xml:lang="en" lang="en"> 
        <head> 
                <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
                <script src="http://www.mysite.com/media/js/jquery-1.2.6.js" type="text/javascript"></script> 
                <script type="text/javascript" src="http://www.mysite.com/media/js/sb/shadowbox-jquery.js"></script> 
                <script type="text/javascript" src="http://www.mysite.com/media/js/sb/shadowbox.js"></script> 
                <script type="text/javascript"> 
 
Shadowbox.loadSkin('classic', 'http://www.mysite.com/media/js/sb/src/skin');
Shadowbox.loadLanguage('en', 'http://www.mysite.com/media/js/sb/src/lang');
Shadowbox.loadPlayer(['iframe', 'html', 'swf','img', 'flv'], 'http://www.mysite.com/media/js/sb/src/player');
 
 
$(window).load(function(){ 
        Shadowbox.init({ 
                handleException: report, 
                handleOversize:     'drag', 
                displayNav:         false, 
                handleUnsupported:  'remove', 
                overlayOpacity: 0.5 
                }); 
        }); 
 
function report(e){ 
        for(i in e) 
                alert(i + " " + e[i] 
                ); 
        } 
</script> 
        </head> 
        
        <body> 
        
        <p>Before the Shadowbox script.</p> 
<!--<script type="text/javascript"> 
    Shadowbox.open({ 
        player:     'html', 
        title:      'Welcome', 
        content:    '<div id="welcome-msg">Welcome to my website!</div>', 
        height:     350, 
        width:      350 
    }); 
</script> 
        --> 
        
<script type="text/javascript"> 
        Shadowbox.open({ 
   player:     'img', 
   title:      'Welcome', 
   content:    'http://www.mysite.com/media/img/NKBAlogo_Member_BlkLowRes2.jpg', 
   height:     350, 
   width:      350 
   }); 
</script> 
 
        <p>After the Shadowbox script.</p> 
 
        </body> 
</html>
[+][-]09.20.2008 at 10:01AM PDT, ID: 22530593

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.20.2008 at 03:24PM PDT, ID: 22531935

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.23.2008 at 06:10AM PDT, ID: 22548803

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628