CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   JavaScript programming (http://www.codingforums.com/forumdisplay.php?f=2)
-   -   Shadowbox load on page load (http://www.codingforums.com/showthread.php?t=282452)

chellert 11-17-2012 05:25 PM

Shadowbox load on page load
 
Hello

I have followed the instructions and can't seem to get this working on ANY brower. I have checked through firebug to find any errors and there are none. If I tried to use a hyperlink to open the shadow box - doesn't work.


<link rel="stylesheet" type="text/css" href="shadowbox/shadowbox.css">
<script type="text/javascript" src="shadowbox/shadowbox.js"></script>
<script type="text/javascript">
window.onload = function() {

Shadowbox.init({
player: ['HTML']
});


Shadowbox.open({
content: 'images/Sympathy-card.jpg',
player: "html",
title: "Monsignor Raymond Hanna"

});

};
</script>

Philip M 11-17-2012 06:18 PM

Are you sure you have spelled shadowbox correctly in your script? Javascript is case-sensitive.



Quizmaster: Which king lost an eye at the Battle of Hastings in 1066?
Contestant: Was it Nelson?

chellert 11-17-2012 06:26 PM

Yep, everything is in lowercase. double and triple checked

DanInMa 11-17-2012 07:18 PM

try changin

Code:

player: ['HTML']
to

Code:

player: 'html'
thats the only thing I don't see done the same way on http://www.shadowbox-js.com/usage.html

also i think your images have to haev the rel='shadowbox" attribute so you could check for that as well

alos did you chec k the net tab in firebug to make sure it's fetching the image images/Sympathy-card.jpg ? maybe it should be /images ?

also content: looks to be literal content, so maybe

Code:

'images/Sympathy-card.jpg'

should be :

Code:

'<img src="images/Sympathy-card.jpg" />'

AndrewGSW 11-17-2012 07:18 PM

Have you added rel="shadowbox" to your links and specified a height and width for non-image links?

chellert 11-17-2012 07:33 PM

I have set the parameters, unset the parameters, played with settings and the rel='shadowbox' doesn't work either.

I followed the code the way the site states but still doesn't work

chellert 11-17-2012 07:38 PM

if I try to do a click function and have the shadowbox appear - still doesn't work. I have checked the location of the files, spelling, etc

Philip M 11-17-2012 07:43 PM

Quote:

Originally Posted by chellert (Post 1292842)
Yep, everything is in lowercase. double and triple checked

Well, it is obviously not.

Shadowbox.init({
player: ['HTML']
});

Shadowbox.open({

chellert 11-17-2012 07:51 PM

changed the letter S from capital to lower and back, still doesn't work

DanInMa 11-17-2012 11:20 PM

"Shadowbox" is correct per the document page http://www.shadowbox-js.com/usage.html

chellert 11-18-2012 09:49 PM

Thanks everyone, I gave up on this - can't figure it out and decided to go another route. Thanks for your posts


All times are GMT +1. The time now is 09:03 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.