View Full Version : Image Thumbnail Viewer problem
adwin
04-06-2008, 05:31 PM
1) Script Title:
Image Thumbnail Viewer
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm
3) Describe problem:
Hi! I'm newish to using scripts and I'm having trouble with this page:
http://www.aaronwinslow.com/hmrc/photocollections/index.xhtml
When the thumbnail is clicked, the image is opened in the browser window without the desired Image Thumbnail Viewer stylishness. I think I'm overlooking something very simple.
Thanks for any thought you put into this!
ddadmin
04-06-2008, 08:03 PM
It seems your entire page isn't returning the proper text/html header when requested from the server. For example, have you tried viewing your page in IE? The browser prompts to download the page instead of load it...
adwin
04-06-2008, 08:15 PM
I've been viewing it in ff. I don't have IE installed on this machine at this point.
I just switched the text/html header to (which is the standard for the people I'm working for:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
and the script is (not) working in the same way. Do you have any advice?
Thank you! Thank you!
ddadmin
04-06-2008, 08:42 PM
The page is still be prompted to be downloaded in IE instead of the usual loading it, so there's still a problem even with the change you made. FYI in Firefox, the error message reported the Java Console when the page loads is:
Error: uncaught exception: [Exception... "Object cannot be created in this context" code: "9" nsresult: "0x80530009 (NS_ERROR_DOM_NOT_SUPPORTED_ERR)" location: "http://www.aaronwinslow.com/hmrc/photocollections/thumbnailviewer.js Line: 20"]
This isn't a typical JS error, and my guess is it's related to the error in your page's header response as well.
adwin
04-06-2008, 09:10 PM
Thanks very much for looking at this. I realize that this isn't really the purpose of this forum... do you see anything in the header that seems incorrect? This is it:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Houston Public Library - Houston Metropolitan Research Center</title>
<link rel="stylesheet" href="../main_hpl.css" type="text/css" />
<link rel="stylesheet" href="thumbnailviewer.css" type="text/css" />
<script src="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>
ddadmin
04-06-2008, 09:28 PM
Try removing this part from your HTML:
<?xml version="1.0" encoding="iso-8859-1"?>
adwin
04-06-2008, 10:11 PM
Thanks! I removed:
<?xml version="1.0" encoding="iso-8859-1"?>
I'm still getting that error that you mentioned. Any ideas?
adwin
04-06-2008, 11:01 PM
and the seemingly related problem of the script not working.
adwin
04-07-2008, 01:56 AM
From poking around in various forums, I learned that Firefox doesn't support document.write in application/xhtml+xml pages. So I changed my page from xhtml to html. And now the script works very nicely.
Thanks for your help!
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.