New Java Script programmer needs help

K

Kevin A. Stevens

I have what I believe to be an easy question regarding a script I'm
editing.
I need to add a Submenu under another Submenu and can't get it right.

Here is the code snippet

menu.addItem("Event Views");
var demos = null;
demos = new MTMenu();
demos.addItem("ECV", "../../panels/ecv/index.html");
demos.addItem("ECV Technology", "../../panels/ecvtech/index.html");
demos.addItem("ECV Administrator",
"../../panels/ecvadmin/index.html");
demos.addItem("ECV Filters", "../../panels/desktop/index.html");
demos.addItem("TSV", "../../panels/tsv/index.html");
demos.addItem("TSN", "../../panels/tsn/index.html");
demos.addItem("System", "../../panels/system/index.html");
demos.addItem("Security", "../../panels/security/index.html");
menu.makeLastSubmenu(demos,true);

What I would like to do is add a Submenu between "ECV Administrator"
and "ECV Filters" called "Database", then under "Database" have
"Oracle" and "SQL". The final code would look something like this I
guess.

menu.addItem("Event Views");
var demos = null;
demos = new MTMenu();
demos.addItem("ECV", "../../panels/ecv/index.html");
demos.addItem("ECV Technology", "../../panels/ecvtech/index.html");
demos.addItem("ECV Administrator",
"../../panels/ecvadmin/index.html");
menu.addItem("Database");
var demos = null;
demos = new MTMenu();
demos.addItem("Oracle", "../../panels/oracle/index.html");
demos.addItem("SQL", "../../panels/sql/index.html");
menu.makeLastSubmenu(demos,true);
demos.addItem("ECV Filters", "../../panels/desktop/index.html");
demos.addItem("TSV", "../../panels/tsv/index.html");
demos.addItem("TSN", "../../panels/tsn/index.html");
demos.addItem("System", "../../panels/system/index.html");
demos.addItem("Security", "../../panels/security/index.html");
menu.makeLastSubmenu(demos,true);

I tried the above code and it didn't work. It created a menu called
"Database" but placed everything under it.

Thanks in advance :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top