PDA

View Full Version : Sending a menu item to _blank?



anonfoo
01-05-2007, 10:30 PM
1) Script Title: HV Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...menu/index.htm menu_com.js

3) Describe problem: I have a question about how to get a link on the menu to go to a new web browser. I know in regular html you just specify target=_blank but how do you do it in the menu like below? i tried adding it to the end of the URL but no dice I also tried the blank '' but that also didnt work.

Menu1_1 = new Array('My Test Link', 'http://www.mytestlink.com', '', 0, 30, 140);

btw: what is that empty ' ' section for (3rd var)? I have never found any sample that uses it.

Thanks in advanced...

jscheuer1
01-05-2007, 10:59 PM
Working from memory, I think this is how that menu does it:


Menu1_1 = new Array('My Test Link', 'javascript:window.open("http://www.mytestlink.com","_blank")', '', 0, 30, 140);

anonfoo
01-06-2007, 04:11 AM
Perfect Thank You!