Results 1 to 4 of 4

Thread: How can i add descriptions?

  1. #1
    Join Date
    Aug 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy How can i add descriptions?

    DHTML SlideShow
    http://www.dynamicdrive.com/dynamici...dhtmlslide.htm

    Using the above script, i'd like to add a description for each picture that changes when the picture changes?

    Help!!

  2. #2
    Join Date
    Aug 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I added this code, but it only runs when i use the Forward or back buttons, and each time i use it, the old text remains and the new text adds to it?

    Code:
    function forward(){
    if (which<photos.length-1){
    which++
    applyeffect()
    document.images.photoslider.src=photos[which]
    
    caption.innerHTML+='<b>' + desc[which] + '</b>';
    
    <div id="caption" style="font-family:arial; font-size:13;"></div>

  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

    Remove the '+' sign from +=
    Code:
    caption.innerHTML='<b>' + desc[which] + '</b>';
    Add an initial caption:
    Code:
    <div id="caption" style="font-family:arial; font-size:13;">Put beginning caption here.</div>
    - John
    ________________________

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

  4. #4
    Join Date
    Aug 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    that's awesome, thx!

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
  •