Control.Modal & Prototype 1.6
Can you post a link to a page which demonstrates the error condition? I can't seem to reproduce the problem here.
Posted August 28th, 2007 at 10:52am by bbodien
it happens to me in any file, with out-of-the box prototype 1.6 and control.modal.2.2.3 even an empty document:
the actual error is: Error: handler has no properties Source File: prototype1.6.js Line: 3867
but the issue is with the unloadCache as mentioned prior. Commenting out that line seems to fix the problem, but I didn't have time to check on what side affects that might have. If anyone can advise further, it would be appreciated.
Posted September 5th, 2007 at 10:20pm by ldg
@ldg: I don't think there are any side effects because Prototype 1.6_rc0 has this on lines 3892-3894 which effectively does what Event.observe(window,'unload',Event.unloadCache,false) is supposed to do...
if (window.attachEvent) {
window.attachEvent("onunload", destroyCache);
}
Also, according to the Prototype 1.6_rc0 blog post, they have a new cross-browser way of detecting when the page has been loaded. I just changed this section...
attachEvents: function(){
Event.observe(window,'load',Control.Modal.load);
Event.observe(window,'unload',Event.unloadCache,false);
}
To this...
attachEvents: function(){
document.observe('contentloaded', Control.Modal.load);
}
No more handler property errors after that, and Control.Modal.load is fired faster.
Posted September 8th, 2007 at 12:46am by PotatoSalad
For you information: the section that you changed is not online... you might want to update the file that the "download" link points to.
Posted November 17th, 2007 at 8:31pm by drtebi
I had the same errors. Turns out, Event.unloadCache() has been removed from Prototype 1.6. Commenting out line 84 (Event.observe(window,'unload',Event.unloadCache,false);) of control.modal.2.2.3.js makes the errors go away for me.
Event.unloadCache() Mailing List Discussion
Prototype API docs
Posted December 17th, 2007 at 3:55pm by derek73
Since Event#unloadCache was removed form the latest prototype RC (1.6.0_rc0)
Event.observe(window,'unload',Event.unloadCache,false);
fails when trying to attach not existent callback.
Posted August 21st, 2007 at 1:54pm by kangax