Results 1 to 5 of 5

Thread: thumbnail viewer II: reset?

  1. #1
    Join Date
    Sep 2007
    Location
    west sacramento
    Posts
    25
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Smile thumbnail viewer II: reset?

    1) Script Title: thumbnail viewer II

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...thumbnail2.htm

    3) Describe problem: how can i add a function to the script that will clear the enlarged image in the loadarea (using onclick)? i don't want the page to reload or have a blank image loaded into the loadarea. i would just like the current image in the loadarea to be removed. i hope this makes sense. 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

    onclick of what? Do you mean that you want to click on the larger image and have it disappear? What action on the part of the user do you want to have make the larger image disappear? If you just mean onmouseout of a clicked trigger, you could add this to every clickable thumbnail:

    Code:
    <a href="bulb.gif" rel="enlargeimage::click" rev="loadarea" 
    onmouseout="document.getElementById('loadarea').innerHTML='';">Thumbnail</a>
    - John
    ________________________

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

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    radiofriendlybox (02-27-2008)

  4. #3
    Join Date
    Sep 2007
    Location
    west sacramento
    Posts
    25
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Smile

    Quote Originally Posted by jscheuer1 View Post
    onclick of what? Do you mean that you want to click on the larger image and have it disappear? What action on the part of the user do you want to have make the larger image disappear? If you just mean onmouseout of a clicked trigger, you could add this to every clickable thumbnail:

    Code:
    <a href="bulb.gif" rel="enlargeimage::click" rev="loadarea" 
    onmouseout="document.getElementById('loadarea').innerHTML='';">Thumbnail</a>
    let's say i have four links:

    pic1
    pic2
    pic3
    clearpic

    pics1-3 will load an enlarged pic in the loadarea.
    clearpic will remove the pic from the loadarea.

    thanks.

  5. #4
    Join Date
    Sep 2007
    Location
    west sacramento
    Posts
    25
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Thumbs up

    oh. i just used your code, but changed to "onclick" function. thanks!

  6. #5
    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

    Practically speaking due to the behavior of some browsers (and sometimes, even some hosts), if it really is a link, it should return false and have descriptive (but ultimately unused) javascript href:

    Code:
    <a href="javascript:clearPic();" 
    onclick="document.getElementById('loadarea').innerHTML='';return false;">clearpic</a>
    - 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
  •