Results 1 to 6 of 6

Thread: How to add text description in Preloaded Slide Show

  1. #1
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to add text description in Preloaded Slide Show

    1) Script Title: Preloaded Slide Show Script by Jason Moon

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

    3) Describe problem: I'd like to add a text description which will go under the image. (each image with its own description)

    another script has text description in it...
    Interactive image slideshow with text description
    http://www.dynamicdrive.com/dynamici...interslide.htm

    but since I prefer preloaded one, I wonder if I can add text description into the preloaded slide show...

    please help~ ^_^

  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

    Have a look here:

    http://www.dynamicdrive.com/forums/s...ad.php?t=13814

    That request was slightly different so, if you need more help, let me know.
    - John
    ________________________

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

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

    Default

    Hi~
    thank you for the reply~
    uh...I already got that script (showing text "Picture 1 of 10") - and thank you for that one~ ^_^

    but besides that showing "# of pics" script, I wanted to add extra sentence along with each image...

    Like if I load a image, "pic01.jpg"
    I want to show text description that says like "This is a picture of me~"
    then, next loaded image "pic02.jpg" with different sentence, "This is a second image"...

    I wonder if it's possible...

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

    If you've truly made the modifications described here:

    http://www.dynamicdrive.com/forums/s...85&postcount=2

    Then all you need to do is to set up an array of your captions:

    Code:
    var caps=[];
    caps[0]="This is a picture of me~"
    caps[1]="This is a second image"
    and so on for however many you need. Put that array at the top of the script, before anything else (but after the opening <script> tag). Then, in this part of the previous modification add (additions red):

    Code:
    ddiv.innerHTML = Message+'<br>'+caps[CurrentSlide];
    - John
    ________________________

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

  5. #5
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    YAY~It works perfect!!!

    John~Thank you soooooo much!

    and I kinda edit the new script you gave me to show the text description in another column)

    luckily,it worked~
    (I didn't even expect that my editiing could work since I have no idea about java)

    ddiv.innerHTML = Message;
    ddiv2.innerHTML = caps[CurrentSlide];

    <div id="ddiv"></div>
    <div id="ddiv2"></div>

    again, thank you so much for the fast reply and for your GREAT HELP!!!

  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

    Well, that will work in IE but, for other browsers you need to include this line:

    Code:
    var ddiv2=document.getElementById? document.getElementById('ddiv2') : document.all['ddiv2'];
    Just below this one:

    Code:
    var ddiv=document.getElementById? document.getElementById('ddiv') : document.all['ddiv'];
    - 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
  •