Results 1 to 4 of 4

Thread: Thumbnail Viewer Javascript Runtime Error?

  1. #1
    Join Date
    Feb 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Thumbnail Viewer Javascript Runtime Error?

    Hello everyone,

    I am building my wife's website using FP 2003 and tried to put a great piece of javascript code I found at this site and used before with no problems, but now it is giving me problems. The java code I am speaking of is at this link
    http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm

    I am not a newbie when it comes to website building and did exactly as the installation instructions said, which is the same as I did the first time I installed it on another website. But when I click "Preview" it gives me a "Runtime Error Line 1: Invalid character". When I "preview in browser" (IE 7) it opens the picture in another page which is not how the javascript is supposed to act. I checked the code, its placement, and even compared the code to the other page's code that worked and I am still at a loss. I also checked the page options in FP 2003 and javascript is checkedmarked Why is this error preventing me from incorporating this simple code into my website?

    The code from the beginning of the page to the href that calls the java code to open the thumbnail below:
    Code:
    <html>
    <head>
    <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>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>New Page 1</title>
    
    
    <body>
    
    <div align="center">
    &nbsp;<table border="1" width="929" id="table1" style="border-collapse: collapse">
    		<tr>
    			<td bgcolor="#F7AABB">
    			<p align="center">&nbsp;</td>
    			<td bgcolor="#F7AABB" align="center"><font face="Papyrus">Home</font></td>
    			<td bgcolor="#F7AABB" align="center"><font face="Papyrus">About Us</font></td>
    			<td bgcolor="#F7AABB" align="center"><font face="Papyrus">Policies</font></td>
    			<td bgcolor="#F7AABB" align="center"><font face="Papyrus">Shipping</font></td>
    			<td bgcolor="#F7AABB" align="center"><font face="Papyrus">Mailing 
    			List</font></td>
    			<td bgcolor="#F7AABB" align="center"><font face="Papyrus">Links</font></td>
    		</tr>
    		<tr>
    			<td width="35%" bgcolor="#F7AABB" valign="top" rowspan="3"></p>
    			<p align="center">Our Products</p>
    			<p align="center"><span lang="en-us">Page1<br>
    			Page2<br>
    			Page3<br>
    			Page4<br>
    			Page5<br>
    			Page6<br>
    			Page7<br>
    			Page8<br>
    			Page9<br>
    			Page10</span></td></p>
    			<td width="22%" colspan="2" align="center" valign="top"> 
    	<a rel="thumbnail" href="images/beaniehat1.jpg">
    					<img src="images/beaniehat1.jpg" width="160" height="123" /></a><p>
    Confused Developer,
    JM
    Last edited by JMareel; 02-01-2009 at 08:00 PM.

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Please post a link to the page on your site that contains the problematic script or attach your code so we can check it out and help you.

  3. #3
    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

    You should never preview in the editor, and when previewing in the browser, you should load the page directly into the browser - don't trust the editor to load it up properly.

    In fact, when installing javascript, it is better to use a text only editor.

    The behavior you are getting in the browser suggests that the script is not available to the page, or your links are not following the correct syntax (but that part looks OK). There could be more than one problem.

    No way to be sure though without a link to your page.
    - John
    ________________________

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

  4. #4
    Join Date
    Feb 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    jscheuer1,

    Thank you for hinting at the previewing straight into browser because the script worked as it should . Its just one more step that I have grown out of that apparently I am going to have to make more standard in my website development. Previewing in FP was just an easy button click and has worked for the most part. Thanks again for the time taken out to review the code and suggestions. I hope I can return the favor and help in some way.

    -JM

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
  •