Results 1 to 3 of 3

Thread: Fade-in Image Slide Show Question

  1. #1
    Join Date
    Sep 2005
    Location
    Australia
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Fade-in Image Slide Show Question

    Fade-in Image Slideshow
    http://www.dynamicdrive.com/dynamici...nslideshow.htm

    Can this script be made to open links in separate custom sized windows, and how can this be done?

    Thanks in advance.

  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

    Yes, it can be done in a number of ways, I'm sure. I picked this method -

    Find this line in the script:
    Code:
    var tempcontainer=fadeimages[i][1]!=""? '<a href="'+fadeimages[i][1]+'" target="'+fadeimages[i][2]+'">' : ""
    Change it to this:
    Code:
    var tempcontainer=fadeimages[i][1]!=""&&fadeimages[i][1]!="#"? '<a href="'+fadeimages[i][1]+'" target="'+fadeimages[i][2]+'">' : fadeimages[i][1]=="#"? '<a href="'+fadeimages[i][1]+'" onclick="'+fadeimages[i][2]+'">' : ""
    Once you've done that, you can enter something like this:
    Code:
    fadeimages[0]=["photo1.jpg", "#", "window.open('http://www.google.com', '', 'width=300, height=250');return false;"]
    In the fade images array. Notice the # sign in the link field. It is a flag that tells the added code to treat this link differently. With that flag, it tells the script to use this:
    Code:
    window.open('http://www.google.com', '', 'width=300, height=250');return false;
    that is entered in what usually is the target field, as an onclick event. You can use any valid form of the window.open() method here that you like (no unescaped double quotes, use single quotes for simplicity's sake, as in my example). You could even put a function call here, as long as you define the function elsewhere on the page.
    - John
    ________________________

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

  3. #3
    Join Date
    Sep 2005
    Location
    Australia
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks heaps... that worked a treat.

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
  •