0

Hello, I've been experiencing this problem for almost a week now, and have tried everything possible to figure out the problem: but I simply cannot.

When I load the web page into my browser (developing it on my local machine) it returns this error:

Window win is already registered in the DOM! Make sure you use setDestroyOnClose() or destroyOnClose: true in the constructor.

Please help. It's been frustrating enough. Thanks in advance!

-Zach

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by scrappedcola
0

I'm guessing you are trying a tutorial for Prototype's Window class (a little more information/context in the future would be awesome btw).

If it's asking for you to setDestroyClose in the constructor I think what is wants is this:

win = new Window({className: "mac_os_x", title: "Sample", width:200, height:150, destroyOnClose: true, recenterAuto:false});

. If you haven't done Object based programming before a constructor is a method called when an object is instantiated to initialize object variables. In this case calling "new Window" calls the Window class's constructor which will initialize the variable destroyOnClose to true.

However without more info (for example your code) this is all I've got.
If you haven't found it yet the documentation and tutorial is here.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.