PDA

View Full Version : Popup with error



Chroder
4 Nov 2006, 8:58 PM
I hope this isn't another embarrassing error on my part ;)

I have a script that opens a popup window. But in Firefox, for some reason on the first load I get this error:
this.fireVisibilityChanged.createDelegate is not a function
Using Firebug to do the stack trace, it's always coming from a line where I use getEl(). The weird thing is that it works if I refresh the page (F5 since I hide the toolbars), and it works just fine in Opera that I just tested. It's always that initial load on the popup and only in Firefox.

Any ideas?

jack.slocum
4 Nov 2006, 9:04 PM
It means you have an invalid element object. Generally this is caused when the id passed to getEl() is invalid (like if there is more than 1 element with that id) or the element passed has no id and you didn't tell getEl to generate one (second param true). In my latest dev copy I have turned on generateId by default so the second param is no longer required.

In the latest beta (downloadable on the latest blog post) it returns null now instead of a busted Element object. That should help debugging for sure.