PDA

View Full Version : Dynamically applying flex menu to a link



bluedog
02-18-2011, 02:13 AM
Looked everywhere for an answer to this but no luck.

Cannot get it to open in same window, I know there is one simple thing to alter but I cannot find it and its driving me nuts

http://www.dynamicdrive.com/dynamicindex1/flexdropdown_suppliment.htm

Im sure its in the flexdropdowncontents.js,

Would really appreciate some help with this.

ddadmin
02-19-2011, 02:22 AM
Well, the 3rd parameter in red causes the corresponding links to open in a new window:


flexmenu1.addItem('#', 'Item 1a', '_new') //addItem(url, text, optionaltarget)

You'll want to remove this parameter, so you're left with just:


flexmenu1.addItem('#', 'Item 1a') //addItem(url, text, optionaltarget)

bluedog
02-19-2011, 02:40 AM
Thanks so much,

the script just lacked the last option after the item

var subul6=flexmenu1.addItem('#', 'Psychology').addSubMenu() //create new 3rd level menu and assign it to new variable
subul6.addItem('index-11.html', 'Tim Mc Corriston')

after your advice I added in the following
subul6.addItem('index-11.html', 'Tim Mc Corriston' , '')

and now its working, really appreciate your help

thanks again