Results 1 to 7 of 7

Thread: Full Size Pic of Carousel Thumbnail On Same Page Help

  1. #1
    Join Date
    Feb 2006
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Full Size Pic of Carousel Thumbnail On Same Page Help

    In reference to this carousel script

    http://www.dynamicdrive.com/dynamicindex14/carousel.htm

    This script is awesome. One thing thought. When you click on an image it opens the full size pic in another window.

    What I would like to do it open the full size image on the right side of the page

    I have done this with javascript with stationary thumbnails but can't seem to apply it to this script

    Basically what I have done is divide the page into a table. It has Two Columns and Two rows like this.


    __________________________
    |************|**********|
    |************|**********|
    |******A*****|****B*****|
    |************|**********|
    |************|**********|
    |_____________|**********|
    |************|**********|
    |*****C******|**********|
    |______________|_________ |
    (sorry that diagrtam is so bad )


    So the carousel runs in cell "A" and when the thumbnail is clicked the full sized pic appears in cell "B"

    (Ideally I'd like to add a text description in cell "C" for each pic but that is another issue)

    As I said I've done this with stationary thumnails (in what would be cell "A") using an onclick or an onmouse over, and a toggle a description.

    But I couldn't get the carousel to work using the onclick or onmouseover.

    Any suggestions? As always thanks in advance.
    Last edited by Markxxx; 02-21-2006 at 07:08 AM.

  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

    - John
    ________________________

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

  3. #3
    Join Date
    Feb 2006
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Cool that works great with one issue.

    I tried to run the page in

    Firefox, Mozilla 1.7.1, Opera, Netscape And K-Meleon and it works fantastic

    Here's the glitch

    When I run it in IE 5.5 it doesn't work

    I get an error message. In the other browsers when I point to the image on the carousel it allows me to click on it. But in IE it doesn't allow that and gives me a javascript error of this

    Line:134
    Char: 19
    Error: Could not get the cursor property. Invalid Argument
    Code: 0

    When I look up in my html editor Line Number 134 is this

    function C_Stp(){this.style.cursor=this.lnk?"pointer":"default";C_Stppd=true;if(this.pic){document.getElementById('picArea').src=this.pic}}

    Character 19 in my editor starts at

    {this.style.cursor

    Character 19 being the {
    In the above line

    Any idea?

    Strange enough this carousel effect looks a lot worse in IE than all the other browsers.

    I just noticed on the example page (listed at top of thread) you get the same error message. Must be something about IE and the effect. Any workaround

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    That's some ugly code.
    Code:
    function C_Stp() {
      if(typeof this.style.cursor != "undefined") this.style.cursor = this.lnk ? "pointer" : "default";
      C_Stppd=true;
      if(this.pic) document.getElementById('picArea').src = this.pic;
    }
    I also don't advise using what I presume is a custom attribute, "pic," to hold the large image's URI.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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

    I think IE5.5 used 'hand' instead of 'pointer'. Not sure how to test out for that and get it to work if that is what the problem is. I wil look into it.
    - John
    ________________________

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

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

    This may get it, works for the version II of the script:

    Code:
    function C_Stp(){this.style.cursor=this.lnk?document.all?"hand":"pointer":"default";C_Stppd=true;if(this.pic){document.getElementById('picArea').src=this.pic}}
    It will force some other browsers to use 'hand' but, most of 'em can 'hand'le it.
    - John
    ________________________

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

  7. #7
    Join Date
    Feb 2006
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    jscheuer1 that last code did it

    It is working in IE now

    Thanks a lot

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
  •