Enjoy an ad free experience by logging in. Not a member yet?
Register .
11-17-2012, 05:25 PM
PM User |
#1
New Coder
Join Date: Mar 2012
Location: Ontario, Canada
Posts: 46
Thanks: 8
Thanked 0 Times in 0 Posts
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>
11-17-2012, 06:18 PM
PM User |
#2
Supreme Master coder!
Join Date: Jun 2002
Location: London, England
Posts: 17,043
Thanks: 197
Thanked 2,412 Times in 2,390 Posts
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?
__________________
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
11-17-2012, 06:26 PM
PM User |
#3
New Coder
Join Date: Mar 2012
Location: Ontario, Canada
Posts: 46
Thanks: 8
Thanked 0 Times in 0 Posts
Yep, everything is in lowercase. double and triple checked
11-17-2012, 07:18 PM
PM User |
#4
Senior Coder
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,307
Thanks: 12
Thanked 204 Times in 204 Posts
try changin
to
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" />'
Last edited by DanInMa; 11-17-2012 at 07:23 PM ..
11-17-2012, 07:18 PM
PM User |
#5
Senior Coder
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
Have you added rel="shadowbox" to your links and specified a height and width for non-image links?
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total
uninanonynymity ."
Me Myself & Irene .
Validate your
HTML and
CSS
11-17-2012, 07:33 PM
PM User |
#6
New Coder
Join Date: Mar 2012
Location: Ontario, Canada
Posts: 46
Thanks: 8
Thanked 0 Times in 0 Posts
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
11-17-2012, 07:38 PM
PM User |
#7
New Coder
Join Date: Mar 2012
Location: Ontario, Canada
Posts: 46
Thanks: 8
Thanked 0 Times in 0 Posts
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
11-17-2012, 07:43 PM
PM User |
#8
Supreme Master coder!
Join Date: Jun 2002
Location: London, England
Posts: 17,043
Thanks: 197
Thanked 2,412 Times in 2,390 Posts
Quote:
Originally Posted by
chellert
Yep, everything is in lowercase. double and triple checked
Well, it is obviously not.
S hadowbox.init({
player: ['HTML']
});
S hadowbox.open({
__________________
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
11-17-2012, 07:51 PM
PM User |
#9
New Coder
Join Date: Mar 2012
Location: Ontario, Canada
Posts: 46
Thanks: 8
Thanked 0 Times in 0 Posts
changed the letter S from capital to lower and back, still doesn't work
11-18-2012, 09:49 PM
PM User |
#11
New Coder
Join Date: Mar 2012
Location: Ontario, Canada
Posts: 46
Thanks: 8
Thanked 0 Times in 0 Posts
Thanks everyone, I gave up on this - can't figure it out and decided to go another route. Thanks for your posts
Jump To Top of Thread
Thread Tools
Rate This Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT +1. The time now is 04:02 AM .
Advertisement
Log in to turn off these ads.