Submit Your Article 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 July 10th, 2007, 09:53 AM   #1
New Member
 

Join Date: Jul 2007
Location: South Coast
Age: 37
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 JennyChaos is on a distinguished road
Problems with Image Viewer

Hi everyone,

I already posted this in the beginners forum, see http://www.webforumz.com/new-to-web-...ore-images.htm, but maybe it wasn't the right forum for my question as I haven't had any answer yet.

Quote:
I have just designed a website which uses the Dynamic Drive Image Thumbnail Viewer. If a visitor clicks on one of the links, the full-size image is superimposed over the page.

Everything worked fine locally because of the short loading times for the thumbnails. Now that the site is online, I have the problem that if I click on a thumbnail before all thumbnails are loaded, the attribute rel="thumbnail" in the <a> tag isn't recognised (I assume because the script hasn't been loaded yet) so that it is ignored and the full size image loads on a new page.

Is there any way I can force the script to be loaded before the images in order to avoid this problem?
Now I've already got the next problem - I have made a few adjustments to the HTML (mainly adjusting the positioning by adding some extra space to the bottom of the main element, inserting line breaks etc.) and all of a sudden the script won't work at all anymore. I must have changed part of the HTML code responsible for loading the JS properly, but can't figure it out (and I'm not the kind of person to give up easily on a problem. The old site is www.chloechaos.com and I have uploaded the new site (without the thumbnail viewer working) to the subdirectory www.chloechaos.com/test/ for comparison.

Oh, and could whoever views the site please ignore its many flaws for the time being (table-based layout, HTML not validating, quirk mode etc - I hope that won't get me an entry in Worst websites ever!!!) as I would like to get the gallery to work before solving everything else.

Thanks,

Jenny

Last edited by JennyChaos; July 10th, 2007 at 10:02 AM.. Reason: Content added
JennyChaos 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 July 10th, 2007, 12:51 PM   #2
New Member
 

Join Date: Jun 2007
Location: England
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Captain Logical is on a distinguished road
Re: Problems with Image Viewer

Quote:
Originally Posted by JennyChaos View Post
Now I've already got the next problem - I have made a few adjustments to the HTML (mainly adjusting the positioning by adding some extra space to the bottom of the main element, inserting line breaks etc.) and all of a sudden the script won't work at all anymore
It's a syntax error clearly indicated in the console:
Code:
var thumbnailviewer={
enableTitle: true,/Should "title" attribute of link be used as description?
enableAnimation: true,/Enable fading animation?
Single-line comments begin with //
Captain Logical 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 July 10th, 2007, 01:50 PM   #3
New Member
 

Join Date: Jul 2007
Location: South Coast
Age: 37
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 JennyChaos is on a distinguished road
Re: Problems with Image Viewer

Of course, you're a star ... I did a global search & replace throughout the whole site in order to get rid of the XML style closing tags (because I had to use quirk mode in order for the vertical alignment of the main content to work and I was getting loads of validation errors). I replaced ' /' with an empty string in all files, not realising that this would not only affect the HTML but also the scripts.

Cheers,

Jenny
JennyChaos 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

Tags
javascript , imageviewer , image viewer , thumbnails


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
There has to be a simpler way to do this!! Animated Image/Information viewer! jpf566 Flash and ActionScript 4 February 25th, 2008 09:41 AM
[SOLVED] JS Image viewer Graisbeck JavaScript 5 January 1st, 2008 09:47 PM
CSS image rollover problems when using hrefs marksk HTML, XHTML and CSS 8 March 9th, 2007 07:45 AM
Not sure where to post this :: image loading problems autumn_whispers2me HTML, XHTML and CSS 5 October 18th, 2005 10:59 AM
Newbie HELP!: Image Thumbnail Viewer II atomic HTML, XHTML and CSS 5 April 5th, 2004 05:44 AM


Search Engine Optimization by vBSEO 3.2.0 RC8