Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32

Thread: DHTML Slide Show - Open In New Window

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

    Default DHTML Slide Show - Open In New Window

    http://dynamicdrive.com/dynamicindex14/dhtmlslide.htm

    Does anyone know how to make it so when I click on an image it opens into a new window instead of the current one? It doesn't have to be anything fancy like a fixed width/height script or anything, just into _new or something like that. Also, setting the <base target="_new"> in the <head> doesn't work so it needs to be from within the script but I'm not a programmer so I'm totally stuck. Thanks in advance!

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Sure. Simply edit the line:

    document.write('<a href="javascript:transport()">')

    inside Code of Step 2 to:

    document.write('<a href="javascript:transport()" target="_new">')

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

    Default

    Thanks much, kind sir/madam, but I get a page not found error in IE and a blank page in Firefox when I click on the image. If you think you can still help me see what I mean here:
    http://www.dreamstarmedia.ca/beta/po...-15/index.html

    Thanks again, I really appreciate it, this is my favourite slide script cuz of the transitions but if I can't get this new window thing to work then I'll just have to go with a different one.

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Ops, my mistake. Try this instead. Edit the line:

    window.location=photoslink[which]

    to:

    window.open(photoslink[which])

  5. #5
    Join Date
    Jul 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok, dood, you rule! That works perfect now! I have two more requests, though, is it possible to have it open in a new window of x-by-x size and center-aligned (but x-by-x will be fine if that's all)? And, is it possible to make the slide show loop so that on the last one if you hit "next" it goes back to first and if on first and hit "back" it goes to last?

    Sorry to keep bugging you but I soooooo want this to work!

  6. #6
    Join Date
    Jul 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hello,

    As my question is related to this script and the topic, I'll ask it here if you don't mind. Is there a way to make it so that when the user enters the slideshow page there is no "Previous link" and when the slideshow is completed there is no "Next" link? This would really be great!

    Thank you for your time!

    Regards,
    Andie

  7. #7
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    PetFish, sure I'll try and get to your other requests this weekend.

    AndieR, the problem with what you're asking is that the user will eventually end up with no Prev nor Next link as he/she cycles through the slideshow. I'm not sure that's a good idea.

  8. #8
    Join Date
    Jul 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hello ddadmin and thank your for your reply.

    Well my idea is that when the user is seeing the first image of the cycle he has no Previous link (as there is no previous image so to speak) and when he is seeing the last image of the cycle there si no Next image (as this is actually the last of the photos). This would avoid users trying to click on a link that isn't really available...

    Thank you for your time.

    Regards,
    Andie

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

    AndieR, that can be done by modifying the script but, one would also have to modify it so as to make those links visible and active again as soon as they would do something. Another option is to leave the links alone but to modify the script so that previous points to the end when the show is at the beginning and next points to the beginning when the show is at the end. Your idea was worked out in this thread, more or less and I've done the other, just not sure where that info is, might have been on another board.
    - John
    ________________________

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

  10. #10
    Join Date
    Jul 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    That's great! Exactly what I was looking for.

    Thank you!

    Regards,
    Andie

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
  •