PDA

View Full Version : Image Thumbnail Viewer & Validation



dmwhipp
05-15-2014, 07:47 PM
1) Script Title: Image Thumbnail Viewer

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm

3) Describe problem: I'm recoding a site in HTML5/CSS3 and would like to know how to edit the coding for the Image Thumbnail Script so it validates, if possible: http://www.altogether.accountsupport.com/clipart.html

I'm getting the error "Bad value thumbnail for attribute rel on element a: The string thumbnail is not a registered keyword or absolute URL" at http://html5.validator.nu

Thanks for any help with this.
Deborah

dmwhipp
05-15-2014, 08:40 PM
I did a little messing around and might have found a solution. I couldn't change rel to id, since then I would have duplicate ids, but I found this in the script:

if (pagelinks[i].getAttribute("rel") && pagelinks[i].getAttribute("rel")=="thumbnail"){ //Begin if statement

I changed rel to class, then did the same on the page and it's now validating. Here's the page: http://www.altogether.accountsupport.com/clipart3.html

Can anyone see why this wouldn't work or see any problems it might cause?
Thanks,
Deborah

dmwhipp
05-15-2014, 08:52 PM
Ugh, in Internet Exploder 9, the enlarged images are fading out on mouse-over....

jscheuer1
05-16-2014, 12:34 AM
I don't think that has anything to do with the change you made. IE has over the last few versions changed how it deals with opacity. And it has done so in a sort of piecemeal fashion. With IE 10 and up, I believe IE is now fully standards compliant in that area. But because of that piecemeal approach, many scripts that dealt with opacity that used to work with IE, don't always in versions 8 and 9.

I think this will take care of the problem (right click and 'Save As'):

5458

dmwhipp
05-16-2014, 03:02 AM
Thanks so much John - you've solved my issue yet again!
http://www.altogether.accountsupport.com/clipart.html
Deborah

dmwhipp
05-16-2014, 01:52 PM
Hi John,
I spoke too soon... for some reason, when the page loads on the top left position (directly above the logo) the Close X and Loading Image (with the animated graphic) load when you enter the page. I'm getting the feeling I either have a coding error elsewhere on the page or am missing something simple. Any help getting this fixed would be greatly appreciated: http://www.altogether.accountsupport.com/clipart.html
Thanks,
Deborah

dmwhipp
05-16-2014, 03:01 PM
Found another issue... something in the script is making all my other site pages open in new windows, which I don't want. Is the getattribute part?

jscheuer1
05-16-2014, 03:03 PM
altogether.accountsupport.com/scripts/thumbnailviewer.css

is a 404 Not Found. It was there before and is required. I think you moved and/or renamed it. You can get a copy from the demo page or here (right click and 'Save As'):

http://www.dynamicdrive.com/dynamicindex4/thumbnailviewer.css

dmwhipp
05-16-2014, 08:40 PM
Thanks John - I was hoping it was something simple like that. I obviously got a little over zealous while cleaning up the server!
Deborah