Results 1 to 5 of 5

Thread: Live thumbnail script opens new window

  1. #1
    Join Date
    Jan 2006
    Posts
    21
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Live thumbnail script opens new window

    Hi Folks,

    I am not a programmer and so use scripts developed by others.

    Chris Klimas developed this neat script that allows the thumbnail to resize within the page.

    I tried to combine the features of 2 modified scripts:
    -- a version that automatically scales down other images on the page when you click one, ensuring that only one is maximized at a time. (http://diverged.org/thumbnail/klimas/ )
    -- a version with valid code (http://diverged.org/thumbnail/konkiel/ )

    I made a mistake somewhere in applying the code, so when you click on an image, it opens a new browser window.
    The problem page (http://www.cmsboston.org/events/hype2006/photos.html )

    I would appreciate help in finding my error.

    Sincerely,
    VRM

  2. #2
    Join Date
    Jan 2006
    Posts
    21
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Solution: put the script in the correct location

    This script goes in the body of the web page following the photos. Since I am not a programmer, I do not understand why.

    VRM

  3. #3
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Sorry, but when I clicked on the images, a browser window did infact, not appear. I'm not sure on the problem you're searching for
    - Mike

  4. #4
    Join Date
    Jan 2006
    Posts
    21
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Solved problem just before your post

    I had originally put the javascript in the "head" of the web page. When I moved to the body, following the photos, the script worked. Since I am not a programmer, I do not understand why.

    VRM

  5. #5
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Oh, right. If you have an element in the <body>, and you are trying to access it (using event handlers) in the <head> it won't work. You have to call them in the body, or you could just, as you said put the whole code in the body
    - Mike

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
  •