Results 1 to 5 of 5

Thread: Preloaded sldeshow

  1. #1
    Join Date
    Jul 2008
    Posts
    31
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default Preloaded sldeshow

    1) Script Title: Preloaded Slideshow

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

    3) Describe problem: I want to replace the buttons in this script with my own images. Whenever I try and do this the slideshow images disappear. At the moment the page in question has the (ugly but functional) buttons. The images I want to use are in a folder called "images" and the images in the slideshow are in a different folder.
    This is the page in question: http://www.caseyorr.com/new/wool2.html

    Thanks.

    Jude

  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

    From Step 2 on the demo page:

    Code:
    <form name="SlideShow">
    <table>
    <tr>
       <td colspan=2><img name="Screen" width=108 height=135></td>
    </tr>
    <tr>
       <td><input type="button" name="Previous" 
    value="*<<*"
    onClick="ShowSlide(-1)"></td>
       <td align="right"><input type="button" name="Next"
    value="*>>*" onClick="ShowSlide(1)"></td>
    </table>
    </form>
    Change it to (you will need to supply the path and filename for the next/previous images as indicated in the green areas):

    Code:
    <form name="SlideShow">
    <table>
    <tr>
       <td colspan=2><img name="Screen" width=108 height=135></td>
    </tr>
    <tr>
       <td><input type="image" name="Previous" 
    src="path and filename of your previous image"
    onClick="ShowSlide(-1)"></td>
       <td align="right"><input type="image" name="Next"
    src="path and filename of your next image" onClick="ShowSlide(1)"></td>
    </table>
    </form>
    For example, where I have:

    path and filename of your previous image

    you could put something like:

    Code:
    images/prev.gif
    The src attribute of an image input tag works exactly the same as the src attribute of an ordinary img tag.
    - John
    ________________________

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

  3. #3
    Join Date
    Jul 2008
    Posts
    31
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    I've tried that but then I get no slideshow images at all, just an empty box.
    Have a look, I've just done as you suggested:

    http://www.caseyorr.com/new/wool2.html

  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

    Very strange, the browser no longer recognises the inputs as elements in the form. I think it should, but perhaps inputs of the type image are not considered form elements. In any case, removing this bit of code:

    Code:
          // THIS WILL DISABLE THE BUTTONS (IE-ONLY)
          document.SlideShow.Previous.disabled = (NextSlide == 0);
          document.SlideShow.Next.disabled = (NextSlide == 
    (Slides.length-1));
    Will fix it. But the buttons will no longer be disabled when they cannot be used. And the form will submit when you click the next image, even though it isn't seen as an element in the form?!! To fix that, use:

    Code:
    <form action="#" name="SlideShow" onsubmit="return false;">
    <table>
    <tr>
       <td colspan=2><img name="Screen" width=450 height=450></td>
    </tr>
    <tr>
    								<td><input type="image" name="Previous" src="images/arrowlft.gif"
     onclick="ShowSlide(-1);return false;"></td>
       <td align="right"><input type="image" name="Next" src="images/arrowrt.gif"
     onclick="ShowSlide(1);return false;"></td>
    							
    								
    							
    </table>
    </form>
    You might want to try The Swiss Army Slide Show instead:

    http://www.dynamicdrive.com/dynamici...army/index.htm
    Last edited by jscheuer1; 08-08-2008 at 03:41 PM. Reason: add link to alternative script
    - John
    ________________________

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

  5. The Following User Says Thank You to jscheuer1 For This Useful Post:

    judeabb (08-08-2008)

  6. #5
    Join Date
    Jul 2008
    Posts
    31
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Thanks a million - it appears to work now!
    I will check out the Swiss Army script too.

    Jude

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
  •