[previous] [next]

Creating menus

NOTE: This section is important and may be a little bit difficult to understand if you know nothing about JavaScript. Read carefully.

A menu system contains submenu systems and/or menu options. When creating a menu system, start with the following line.

m = menu_pointer
Where

To define a submenu system/menu option under a menu system, add the following line.

m[m.length] = new Menu("name", icon_num[, "action"])
Where

Take a look at the following examples.

  1. m = menus[0].menus
    m[m.length] = new Menu("This is a submenu system.", 0)
    m[m.length] = new Menu("This is a menu option.",1, "http://animetheme.simplenet.com/")

    The above code creates the main program menu system with one submenu system and one menu option.

  2. m = menus[0].menus[0].menus[1].menus
    m[m.length] = new Menu("This is a submenu system.", 0)
    m[m.length] = new Menu("This is a menu option.",1, " test()")

    The above code creates the SECOND menu system under the FIRST menu system of the main program menu system with one submenu system and one menu option which will run a JavaScript function when clicked.


[previous] [next]

Return to Dynamic HTML Resource Center