Results 1 to 3 of 3

Thread: Chained Select Menu window options

  1. #1
    Join Date
    Oct 2005
    Location
    Myrtle Beach, SC
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Chained Select Menu window options

    This post is in referrence to:
    Chained Select Menu
    Located at:
    http://www.dynamicdrive.com/dynamici...menu/index.htm

    I see the option that allows you to select whether or not you want the new window to open in location or new window.

    Code:
    var newwindow=0 //Open links in new window or not? 1=yes, 0=no.
    I was wondering if there is a way to change this so that any selection that chooses a local page would open in window location, but any selection directing to an outside page would open in a new window. Is there a way to look for relational vs. absolute paths?

    Thank you in advance for any help that you can offer.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,957
    Thanks
    43
    Thanked 3,195 Times in 3,157 Posts
    Blog Entries
    12

    Default

    Yes, in chainedmenu.js find this line:

    Code:
    else if (newwindow==1)
    change it to:

    Code:
    else if (newwindow==1&&selectedOptionvalue.indexOf('http')!==-1)
    Make sure to set:

    Code:
    var newwindow=1 //Open links in new window or not? 1=yes, 0=no.
    - John
    ________________________

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

  3. #3
    Join Date
    Oct 2005
    Location
    Myrtle Beach, SC
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you very much, John. I'm sure you already know this, but I'm going to say it anyway ...

    Works like a charm!!!!

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
  •