iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > JavaScript

Reply
 
LinkBack Thread Tools
Old March 12th, 2008, 04:14 PM   #1
New Member
 

Join Date: Mar 2008
Location: California
Age: 28
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 byrd80 is on a distinguished road
[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 06:06 PM.. Reason: Solved!
byrd80 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old March 12th, 2008, 04:16 PM   #2
Ed
Highly Reputable Member
 

Join Date: Jul 2007
Location: Cork, Ireland
Posts: 828
Blog Entries: 1
Thanks: 1
Thanked 2 Times in 2 Posts
Rep Altering Power: 0 Ed is on a distinguished road
Re: Lightbox 2 Issue

Moved to JavaScript Forum.

Ed.
Ed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old March 12th, 2008, 05:32 PM   #3
Most Reputable Member
 

Join Date: Feb 2008
Location: In My Own Little World
Age: 15
Posts: 1,346
Blog Entries: 9
Thanks: 2
Thanked 45 Times in 45 Posts
Rep Altering Power: 0 CloudedVision is on a distinguished road
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
__________________
Theron Luhn
CloudedVision is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old March 12th, 2008, 07:19 PM   #4
New Member
 

Join Date: Mar 2008
Location: California
Age: 28
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 byrd80 is on a distinguished road
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!
byrd80 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old March 12th, 2008, 08:38 PM   #5
Most Reputable Member
 

Join Date: Feb 2008
Location: In My Own Little World
Age: 15
Posts: 1,346
Blog Entries: 9
Thanks: 2
Thanked 45 Times in 45 Posts
Rep Altering Power: 0 CloudedVision is on a distinguished road
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
__________________
Theron Luhn

Last edited by CloudedVision; March 12th, 2008 at 09:30 PM..
CloudedVision is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old March 12th, 2008, 09:22 PM   #6
Highly Reputable Member
SuperMember
 
unitedcraig's Avatar
 

Join Date: Oct 2007
Location: Stockport
Age: 18
Posts: 844
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 unitedcraig is on a distinguished road
Re: Lightbox 2 Issue

instead of having pages/sound.htm, place sound htm in the same directory as your index page, this could work
unitedcraig is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old March 12th, 2008, 09:41 PM   #7
Aso
Most Reputable Member
 

Join Date: Oct 2007
Location: UK
Posts: 1,633
Blog Entries: 2
Thanks: 22
Thanked 84 Times in 79 Posts
Rep Altering Power: 0 Aso is on a distinguished road
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).
Aso is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old March 12th, 2008, 09:43 PM   #8
Highly Reputable Member
SuperMember
 
unitedcraig's Avatar
 

Join Date: Oct 2007
Location: Stockport
Age: 18
Posts: 844
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 unitedcraig is on a distinguished road
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
unitedcraig is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old March 12th, 2008, 10:27 PM   #9
New Member
 

Join Date: Mar 2008
Location: California
Age: 28
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 byrd80 is on a distinguished road
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?
byrd80 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old March 13th, 2008, 11:27 AM   #10
Aso
Most Reputable Member
 

Join Date: Oct 2007
Location: UK
Posts: 1,633
Blog Entries: 2
Thanks: 22
Thanked 84 Times in 79 Posts
Rep Altering Power: 0 Aso is on a distinguished road
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',
Aso is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old March 13th, 2008, 12:11 PM   #11
New Member
 

Join Date: Mar 2008
Location: California
Age: 28
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 byrd80 is on a distinguished road
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.
byrd80 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 5 May 11th, 2009 04:22 AM
Very odd lightbox issue Zonglars HTML, XHTML and CSS 6 December 25th, 2007 07:17 AM
Help with Lightbox tox0tes HTML, XHTML and CSS 4 September 6th, 2007 02:05 PM
Flash Nav and Lightbox 2.0 Maverick25r Flash and ActionScript 1 June 25th, 2007 11:04 AM
Lightbox Questions saltedm8 JavaScript 5 May 21st, 2007 04:39 PM


Search Engine Optimization by vBSEO 3.2.0 RC8