Results 1 to 4 of 4

Thread: Image Thumbnail Viewer Problem in Chrome

  1. #1
    Join Date
    Jun 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Image Thumbnail Viewer Problem in Chrome

    1) Script Title: Image Thumbnail Viewer

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

    3) Describe problem:
    In Chrome, the top of the page shows the loading.GIF and the button to close the window when it's done being viewed. The code is in the top of the page, and has been for a while, and this is just starting to crop up now, so I don't know if it was a change to Chrome. It works fine in Firefox, and in IE it flashes the same stuff whilst loading the page, but disappears once the page is fully loaded. Once clicked on in Chrome, it stays hidden. The enlarged image also isn't centred when first clicked on, but I'm not too worried about that.

    Is there an easy fix to this?

    Thanks!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Works fine here in Chrome, at least on the demo page here on Dynamic Drive. Does that work OK for you in Chrome? If not, it could be settings in your Chrome browser.

    But I suspect the demo page is fine in your Chrome.

    I cannot be sure without seeing the page. But this seems like a problem caused by a missing or edited thumbnailviewer.css file.

    If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jun 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hello,
    I checked the CSS, and it's identical to the one currently posted on the site, I really am at a loss here.

    One of the pages we're using it on is this one:

    http://www.slimlinewarehouse.com.au/...DY05-S-A0.html

    With messing with it, I got it to work if I move the script out out of the head tag and just into the html, but that doesn't explain why it's doing what it's doing.

    Thanks in advance for your help
    Last edited by JustinBail23; 06-04-2012 at 10:19 AM.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The page is in quirks mode. That gives browsers license to interpret HTML, javascript, and css in a very loose and idiosyncratic fashion with no regard to standards. So there's no way to predict with certainty what a given markup, script or style will do in any given browser. In addition there are other scripts on the page. One or more of these may be interfering. I found that the viewer worked OK-ish in my Chrome. The first time it loaded to the left. After that, if I dismissed it and opened it again it was centered. The loading and close images where in the upper left of the page at first.

    I do see this in the source code:

    Code:
    <link href="http://www.slimlinewarehouse.com.au/CSS_01.css" rel="stylesheet" media="screen">
    <script src="http://www.slimlinewarehouse.com.au/DHTML/imgThmbnail/thumbnailviewer.js" type="text/javascript">
    /***********************************************
    * Image Thumbnail Viewer Script- © Dynamic Drive (www.dynamicdrive.com)
    * This notice must stay intact for legal use.
    * Visit http://www.dynamicdrive.com/ for full source code
    ***********************************************/</script>
    		<link rel="stylesheet" href="http://www.slimlinewarehouse.com.au/DHTML/imgThmbnail/thumbnailviewer.css" type="text/css">
    	</head>
    That should be:

    Code:
    <link href="http://www.slimlinewarehouse.com.au/CSS_01.css" rel="stylesheet" media="screen">
    <link rel="stylesheet" href="http://www.slimlinewarehouse.com.au/DHTML/imgThmbnail/thumbnailviewer.css" type="text/css">
    <script src="http://www.slimlinewarehouse.com.au/DHTML/imgThmbnail/thumbnailviewer.js" type="text/javascript">
    /***********************************************
    * Image Thumbnail Viewer Script- © Dynamic Drive (www.dynamicdrive.com)
    * This notice must stay intact for legal use.
    * Visit http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    </script>
    	</head>
    Notice that the stylesheet is now before the script and the closing script tag is below the script comment. I tried it here and it fixed it.

    The browser cache may need to be cleared and/or the page refreshed to see changes.
    Last edited by jscheuer1; 06-04-2012 at 07:06 PM. Reason: correct the correction
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •