Results 1 to 5 of 5

Thread: Can text be added to the DHTML slideshow script?

  1. #1
    Join Date
    Mar 2005
    Location
    Jupiter
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Can text be added to the DHTML slideshow script?

    I need to have the text to the right of the image change with each image. So when you click "Next" the text on the right will change to describe the image on the left.

    You can see what I am trying to do here:
    http://www.kalinawebdesigns.com/draf...layGallery.htm

    Any and all help is greatly appreciated.

    Thank you,
    Kalina

  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 Text Added

    That's a job for innerHTML and getElementById.

    where you have:

    Code:
    <div name="photoslider">
    use:

    Code:
    <div id="photodesc">
    then, each place this appears:

    Code:
    document.images.photoslider.src=photos[which]
    follow it on the next line with:

    Code:
    document.getElementById('photodesc').innerHTML=desc[which]
    This should all work because you have already created the array, desc[] which has the descriptions in it. If I've followed your code correctly, all you should have to mess with after doing the above is changing the actual descriptions' text.

    Note: this solution has been corrected as per Kalina's astute observation.
    Last edited by jscheuer1; 03-11-2005 at 10:21 PM. Reason: Correction

  3. #3
    Join Date
    Mar 2005
    Location
    Jupiter
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the help jscheuer1.

    I've added your code in and it doesn't change the text yet, but doesn't cause error's either. I will work with this and see if I can get it going.

    Thanks,
    Kalina

  4. #4
    Join Date
    Mar 2005
    Location
    Jupiter
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks again, I got it working, I just need to make Html all uppercase IE; HTML.

    Kalina

  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 You're Welcome

    You're welcome, sorry about the capitalization error on my part, I've corrected it in my original post.

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
  •