|
|
 |
March 12th, 2008, 05:14 PM
|
#1
|
|
New Member
Join Date: Mar 2008
Location: California
Age: 29
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
[SOLVED] Lightbox 2 Issue
I'm using Lightbox 2 in a new site I'm building and having issues with the Close & Loading gifs.
The index page has 2 images that open up in lightbox and everything works fine.
Then on another page ( pages/sound.htm ) the images open up in lightbox, the effect works, but the close & loading gifs do not appear.
This is the case in bothe IE & Firefox ( IE shows the red x )
Im not sure where I've gone wrong. Everything seems to be linked up correctly.
Here is the site:
http://www.freebassaudio.net/index.htm
Please reference the Home & Sound pages. Any help would be greatly appreciated, as I cannot seem to figure this out, thanks.
-Will
Last edited by CloudedVision; March 13th, 2008 at 07:06 PM..
Reason: Solved!
|
|
|
March 12th, 2008, 05:16 PM
|
#2
|
|
Highly Reputable Member
Join Date: Jul 2007
Location: Cork, Ireland
Posts: 828
Thanks: 1
Thanked 2 Times in 2 Posts
Rep Altering Power: 0
|
Re: Lightbox 2 Issue
Moved to JavaScript Forum.
Ed.
|
|
|
March 12th, 2008, 06:32 PM
|
#3
|
|
Most Reputable Member
Join Date: Feb 2008
Location: In My Own Little World
Age: 15
Posts: 1,346
Thanks: 2
Thanked 45 Times in 45 Posts
Rep Altering Power: 0
|
Re: Lightbox 2 Issue
most likely the page is in a different directory so the link to the image is broken. Try adding a slash in front of the image URL. eg: test/bla.jpg -> /test/bla.jpg
|
|
|
March 12th, 2008, 08:19 PM
|
#4
|
|
New Member
Join Date: Mar 2008
Location: California
Age: 29
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Lightbox 2 Issue
unfortunately, thats not the problem.
thats whats got me so confused, everything looks to be linked up properly. looks like ill keep re-checking.
thx!
|
|
|
March 12th, 2008, 09:38 PM
|
#5
|
|
Most Reputable Member
Join Date: Feb 2008
Location: In My Own Little World
Age: 15
Posts: 1,346
Thanks: 2
Thanked 45 Times in 45 Posts
Rep Altering Power: 0
|
Re: Lightbox 2 Issue
think you could post a link of the page that works and the page that doesn't?
Edit: Oops, didn't see there already was a link
Last edited by CloudedVision; March 12th, 2008 at 10:30 PM..
|
|
|
March 12th, 2008, 10:22 PM
|
#6
|
|
Highly Reputable Member
SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 18
Posts: 844
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0
|
Re: Lightbox 2 Issue
instead of having pages/sound.htm, place sound htm in the same directory as your index page, this could work
|
|
|
March 12th, 2008, 10:41 PM
|
#7
|
|
Most Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 1,633
Thanks: 22
Thanked 84 Times in 79 Posts
Rep Altering Power: 0
|
Re: Lightbox 2 Issue
The Lightbox graphics are relative to the CSS file. In your case, this is at the root of your site.
However, you're linking to graphics like so;
Code:
#prevLink:hover, #prevLink:visited:hover { background: url(../images/prevlabel.gif) left 15% no-repeat; }
#nextLink:hover, #nextLink:visited:hover { background: url(../images/nextlabel.gif) right 15% no-repeat; }
Your linking to a directory higher than your root (using ../), when it should just be
Code:
#prevLink:hover, #prevLink:visited:hover { background: url(/images/prevlabel.gif) left 15% no-repeat; }
#nextLink:hover, #nextLink:visited:hover { background: url(/images/nextlabel.gif) right 15% no-repeat; }
If this still doesn't work, then specify absolute URL's (eg. http://freebassaudio.net/images/prevlabel.gif).
|
|
|
March 12th, 2008, 10:43 PM
|
#8
|
|
Highly Reputable Member
SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 18
Posts: 844
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0
|
Re: Lightbox 2 Issue
This is what i meant, just not in such a detailed way
I have had quite a bit of trouble with lightbox in the past, all to do with links to files
|
|
|
March 12th, 2008, 11:27 PM
|
#9
|
|
New Member
Join Date: Mar 2008
Location: California
Age: 29
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Lightbox 2 Issue
thanks so much, aso. that worked for the previous and next label gifs, although the close and loading gif still do not work on the pages inside the "pages" folder.
and im not seeing where my closelabel. gif is linked in the css. i only see the link to the prev and next gifs.
am i missing something?
|
|
|
March 13th, 2008, 12:27 PM
|
#10
|
|
Most Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 1,633
Thanks: 22
Thanked 84 Times in 79 Posts
Rep Altering Power: 0
|
Re: Lightbox 2 Issue
Ok, it seems in Lightbox 2, they specify the loading and close image locations in lightbox.js, which seems a little odd.
In fact, for how you're using lightbox, you'd be better off with Slimbox. It's much lighter, and only requires a fraction of the mootools framework.
But I know that's off topic, it's up to you if you want to change  .
So the reason the loading and close images don't work for your 'page' directory, is because javascript uses the directory relative to the page it's called from (unlike CSS, which is relative to the file itself).
So, open lightbox.js and modify fileLoadingImage and fileBottomNavCloseImage to:
Code:
fileLoadingImage: 'http://www.freebassaudio.net/images/loading.gif',
fileBottomNavCloseImage: 'http://www.freebassaudio.net/images/closelabel.gif',
|
|
|
March 13th, 2008, 01:11 PM
|
#11
|
|
New Member
Join Date: Mar 2008
Location: California
Age: 29
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: Lightbox 2 Issue
thanks again, aso186. finally found those links at around 1am! everything works now *breathes a sigh of relief*
ill have to check out slimbox, thanks for the tip.
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
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
|
|
|
|