View Full Version : Chained Select Menu window options

10-04-2005, 12:29 AM
This post is in referrence to:
Chained Select Menu
Located at:

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

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.

10-04-2005, 06:38 PM
Yes, in chainedmenu.js find this line:

else if (newwindow==1)

change it to:

else if (newwindow==1&&selectedOptionvalue.indexOf('http')!==-1)

Make sure to set:

var newwindow=1 //Open links in new window or not? 1=yes, 0=no.

10-04-2005, 08:40 PM
Thank you very much, John. I'm sure you already know this, but I'm going to say it anyway ...

Works like a charm!!!! :)