Lightbox 2 Issue

This is a discussion on "Lightbox 2 Issue" within the JavaScript Forum section. This forum, and the thread "Lightbox 2 Issue are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Mar 12th, 2008, 19:14
Junior Member
Join Date: Mar 2008
Location: California
Age: 28
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
[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; Mar 13th, 2008 at 21:06. Reason: Solved!
Reply With Quote

  #2 (permalink)  
Old Mar 12th, 2008, 19:16
Ed Ed is offline
Highly Reputable Member
Join Date: Jul 2007
Location: Cork, Ireland
Posts: 687
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Lightbox 2 Issue

Moved to JavaScript Forum.

Ed.
Last Blog Entry: Happy New Year! (Dec 31st, 2007)
Reply With Quote
  #3 (permalink)  
Old Mar 12th, 2008, 20:32
CloudedVision's Avatar
Nerdy Moderator
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 942
Blog Entries: 8
Thanks: 2
Thanked 22 Times in 22 Posts
Send a message via AIM to CloudedVision Send a message via MSN to CloudedVision Send a message via Skype™ to CloudedVision
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
__________________
echo "Take it easy, ".$CloudedVision;
.links { site: other-road-design; blog: only-nerds-allowed; project: resource-fish; organization: ARMIES6; }
<quote>&quot;I think it's wrong that only one company makes the game Monopoly&quot; - <name>Steven Wright</name></quote>
Last Blog Entry: More Cheat Sheets (Jul 12th, 2008)
Reply With Quote
  #4 (permalink)  
Old Mar 12th, 2008, 22:19
Junior Member
Join Date: Mar 2008
Location: California
Age: 28
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Reply With Quote
  #5 (permalink)  
Old Mar 12th, 2008, 23:38
CloudedVision's Avatar
Nerdy Moderator
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 942
Blog Entries: 8
Thanks: 2
Thanked 22 Times in 22 Posts
Send a message via AIM to CloudedVision Send a message via MSN to CloudedVision Send a message via Skype™ to CloudedVision
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
__________________
echo "Take it easy, ".$CloudedVision;
.links { site: other-road-design; blog: only-nerds-allowed; project: resource-fish; organization: ARMIES6; }
<quote>&quot;I think it's wrong that only one company makes the game Monopoly&quot; - <name>Steven Wright</name></quote>
Last Blog Entry: More Cheat Sheets (Jul 12th, 2008)

Last edited by CloudedVision; Mar 13th, 2008 at 00:30.
Reply With Quote
  #6 (permalink)  
Old Mar 13th, 2008, 00:22
unitedcraig's Avatar
SuperMember

SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 17
Posts: 825
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Lightbox 2 Issue

instead of having pages/sound.htm, place sound htm in the same directory as your index page, this could work
__________________
Last Blog Entry: A Royal Mistake (Feb 20th, 2008)
Reply With Quote
  #7 (permalink)  
Old Mar 13th, 2008, 00:41
Aso's Avatar
Aso Aso is offline
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,012
Blog Entries: 2
Thanks: 5
Thanked 23 Times in 20 Posts
Send a message via Skype™ to Aso
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: Select all
#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: Select all
#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).
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Reply With Quote
  #8 (permalink)  
Old Mar 13th, 2008, 00:43
unitedcraig's Avatar
SuperMember

SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 17
Posts: 825
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
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
__________________
Last Blog Entry: A Royal Mistake (Feb 20th, 2008)
Reply With Quote
  #9 (permalink)  
Old Mar 13th, 2008, 01:27
Junior Member
Join Date: Mar 2008
Location: California
Age: 28
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
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?
Reply With Quote
  #10 (permalink)  
Old Mar 13th, 2008, 14:27
Aso's Avatar
Aso Aso is offline
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,012
Blog Entries: 2
Thanks: 5
Thanked 23 Times in 20 Posts
Send a message via Skype™ to Aso
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: Select all
fileLoadingImage:        'http://www.freebassaudio.net/images/loading.gif',
fileBottomNavCloseImage: 'http://www.freebassaudio.net/images/closelabel.gif',
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Reply With Quote
  #11 (permalink)  
Old Mar 13th, 2008, 15:11
Junior Member
Join Date: Mar 2008
Location: California
Age: 28
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Variables in ASP with LightBox LeeNic Classic ASP 4 Mar 18th, 2008 15:12
Very odd lightbox issue Zonglars Web Page Design 6 Dec 25th, 2007 11:17
Help with Lightbox tox0tes Web Page Design 4 Sep 6th, 2007 18:05
Flash Nav and Lightbox 2.0 Maverick25r Flash & Multimedia Forum 1 Jun 25th, 2007 15:04
Lightbox Questions saltedm8 JavaScript Forum 5 May 21st, 2007 20:39


All times are GMT. The time now is 04:49.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

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