Results 1 to 6 of 6

Thread: Preloaded slideshow script

  1. #1
    Join Date
    Mar 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Preloaded slideshow script

    Hi,
    I wanted to see how I could add an image button instead of the arrow form element to this slideshow. When I go to change the input type as an image and add the image file, the slideshow doesn't work. Help.

    Here is the link to the script:http://www.dynamicdrive.com/dynamici...eloadslide.htm

  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

    Code:
       <td><input type="button" name="Previous" 
    value="" style="background:silver url('prev.gif') no-repeat center;width:2em;" onClick="ShowSlide(-1)"></td>
       <td align="right"><input type="button" name="Next"
    value="" style="background:silver url('next.gif') no-repeat center;width:2em;" onClick="ShowSlide(1)"></td>
    - John
    ________________________

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

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

    Default

    Thank you!

    Is there a way just to use an image that I made that already looks like a button instead of filling in a button? I wanted a round button, that's why.

  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

    I played around with the script a bit before coming up with the solution I offered above. I was able to get as far as using one image input but, the script refused to accept two image inputs, even with changing the script's code. It was as though the browser wouldn't accept them as part of the form. We could mod the script further and dispense with the form altogether, allowing any link (images included) to act as buttons, this will require flags to disable the buttons at the appropriate times. I'll look into it.
    - John
    ________________________

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

  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

    Almost easier done than said. Remove this from the script:
    Code:
          // THIS WILL DISABLE THE BUTTONS (IE-ONLY)
          document.SlideShow.Previous.disabled = (NextSlide == 0);
          document.SlideShow.Next.disabled = (NextSlide == 
    (Slides.length-1));
    Then you can use this format for the controls:
    HTML Code:
       <td><input type="image" name="Previous" src="prev.gif" onClick="ShowSlide(-1);return false"></td>
       <td align="right"><input type="image" name="Next" src="next.gif" onClick="ShowSlide(1);return false"></td>
    No need to get rid of the form after all.
    - John
    ________________________

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

  6. #6
    Join Date
    Mar 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you so much. That's awesome!

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
  •