Forum Moderators: open

Message Too Old, No Replies

Close window coding in a menu

         

chrman

5:41 pm on Sep 18, 2001 (gmt 0)



I am trying to add a close menu function to a javascript navigation menu. I have tried a couple of variations of coding but none of them will function within the menu. The format of the item line is

Menu6_1=new Array("About DSS","help files/help1.htm",0,20,150);

in place of the html link i need to figure out how to replace it with a window close function. I do not have to worry about warning messages about closeing the window as it is opened from another page.

Any help is appreciated

oilman

6:01 pm on Sep 18, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



have you tried:
"javascript:window.close();"

ie: Menu6_1=new Array("Close Window","javascript:window.close();",0,20,150);

I'm not sure if the js will interact properly with the array but it's worth a shot.

chrman

6:08 pm on Sep 18, 2001 (gmt 0)



I have tried that, and no it did not work. I guess the issue is the Array itself. I don't know if i need to add some coding to the file so it will recognize that command or not. I know i can always add a button or text link seperate but it would be nice to have it function in the menu itself.

andrey_sea

9:37 pm on Sep 20, 2001 (gmt 0)

10+ Year Member



You need to add more info how you use the link from array. May be to make that JS code work you need to use an eval function?