Creating Window Objects From init()

admin

Administrator
Staff member
I need to create an object from within the init() method (called after the page loads with onLoad), that belongs to the window object. The code:

init() {

var myMenu = new Menu();

showMenu(window.myMenu);

}

results in the error

"window.myMenu" does not exist.

I need the object to belong to window so that a new page is not invoked. Any ideas people?
 
Back
Top