-
8 Mar 2007 2:21 PM #1
MessageBox.alert
MessageBox.alert
I get the following error in FireBug when I click on the "OK" button when using MessageBox.alert. The 'X' in the top-right-hand corner doesn't cause the error, but the button does.
Anyone else?
[Exception... "'Permission denied to get property HTMLDivElement.nodeType' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]
-
14 Mar 2007 4:28 PM #2
Yes, I am seeing this too. Figure anything out?
-
14 Mar 2007 4:32 PM #3
No...
It's not a bid deal (doesn't effect anything)..but I did notice that it is only when you click on the buttons that have focus.
Like the MessageBox.Alert (OK button has focus), if you use the prompt with OKNOCANCEL, OK has focus and throws the error. The other buttons don't...
-
14 Mar 2007 4:44 PM #4
I also noticed that firebug doesn't stop on those "permission denied" exceptions. hard to track down.
-
20 Mar 2007 11:37 AM #5
I am also seeing this problem appear in Firefox when the mouse passes over OK/Cancel buttons I have in a dialog. Its very difficult to track down as it only happens every so often.
- Error: [Exception... "'Permission denied to get property HTMLDivElement.nodeType' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]
I don't think the code that I use for the dialog is anything whacky - but I have included it below incase anything sticks out...
Code:var PropertyDialog = function(config) { // create the dialog from scratch var dlg = new Ext.LayoutDialog(config.id || Ext.id(), { autoCreate : true, minWidth:400, minHeight:300, syncHeightBeforeShow: true, shadow:true, collapsible : false, fixedcenter:true, resizable:false, modal: true, center:{autoScroll:false} }); dlg.setTitle('Property Dialog'); dlg.getEl().addClass('ychooser-dlg'); dlg.addKeyListener(27, dlg.hide, dlg); Ext.QuickTips.init(); // add some buttons this.ok = dlg.addButton('OK', this.doCallback, this); //this.ok.disable(); dlg.setDefaultButton(dlg.addButton('Cancel', dlg.hide, dlg)); dlg.on('show', this.load, this); this.dlg = dlg; var layout = dlg.getLayout(); // filter/sorting toolbar this.tb = new Ext.Toolbar(this.dlg.body.createChild({tag:'div'})); this.tb.add({ icon: './motts/images/dialog/browser.gif', // icons can also be specified inline cls: 'x-btn-icon', tooltip: 'Launch Browser with URL' }); this.tb.add('-', { icon: './motts/images/dialog/help.gif', // icons can also be specified inline cls: 'x-btn-icon', tooltip: 'Display Help' }); // add the panels to the layout layout.beginUpdate(); var vp = layout.add('center', new Ext.ContentPanel(Ext.id(), { autoCreate : true, toolbar: this.tb, fitToFrame:true })); layout.endUpdate(); this.bodyEl = vp.getEl(); this.bodyEl.appendChild(this.tb.getEl()); this.mainP = this.bodyEl.createChild({ tag:"div", cls:"prop-mb-area", html:'<span class="prop-mb-text"></span> <textarea class="prop-mb-textarea"></textarea>' }); msgEl = this.mainP.dom.firstChild; textareaEl = Ext.get(this.mainP.dom.childNodes[2]); textareaEl.enableDisplayMode(); textareaEl.setHeight('191px'); textareaEl.setWidth('100%'); Ext.apply(this, config, { width: 540, height: 400 }); dlg.resizeTo(this.width, this.height); this.loaded = false; this.originalValue = ''; this.row = null; this.col = null; this.record = null; this.scope = null; }; PropertyDialog.prototype = { show : function(el, callback, property, value, row, col, r, scope){ this.reset(); msgEl.innerHTML = "Property Name: " + property; textareaEl.dom.value = value; this.originalValue = value; this.col = col; this.row = row; this.record = r; this.scope = scope; this.dlg.show(el); this.callback = callback; }, reset : function(){ msgEl.innerHTML = ''; textareaEl.dom.value = ''; this.originalValue = ''; this.row = null; this.col = null; this.record = null; this.col = null; this.row = null; this.record = null; }, doCallback : function(){ var desc = textareaEl.dom.value; var callback = this.callback; var originalValue = this.originalValue; var row = this.row; var col = this.col; var record = this.record; var scope = this.scope; this.reset(); this.dlg.hide(function() { if(desc && callback) { callback(desc, originalValue, row, col, record, scope); } }); }, load : function(){ if(!this.loaded){ } }, onLoad : function(){ this.loaded = true; } };
-
20 Mar 2007 11:55 AM #6
Just found how to get the error all the time - if you launch the msg-box.html example in Firefox (using v2) and then launch the Multi Line Prompt example - then place your mouse below the window below either the OK or Cancel button and quickly move you mouse up to above the window and then back down to below the window you will quickly build up a list of these errors (although this may seem extreme its the only way to reliably get this error occuring).
The error seems to be triggerd by the larger movement that covers the entire height of the window rather than small movements that only cover say the buttons.
Alastair.
-
6 May 2007 9:10 PM #7
Local File
Local File
Are you loading the file from the local filesystem or doing cross-domain ajax call?
-
11 May 2007 12:51 PM #8
It is a browser bug: https://bugzilla.mozilla.org/show_bug.cgi?id=261423
And it is in this forum too, but you must to search, before start another thread about this...
http://extjs.com/forum/showthread.php?t=4923
Jack or a moderator: can you pin a thread about this? It is a common problem...
Similar Threads
-
Newline equivilent in Ext.MessageBox.alert()
By thejoker101 in forum Ext 2.x: Help & DiscussionReplies: 9Last Post: 9 Apr 2010, 3:54 AM -
Only Alert Script from Message Dialogs
By minoan in forum Ext 1.x: Help & DiscussionReplies: 4Last Post: 20 Mar 2007, 11:44 AM -
MessageBox alert and '\n'
By cebola in forum Ext 1.x: Help & DiscussionReplies: 2Last Post: 13 Mar 2007, 5:25 AM -
Replace standart Alert dialog with ext.BasicDialog
By Timoshka in forum Ext 1.x: Help & DiscussionReplies: 3Last Post: 29 Dec 2006, 11:52 AM -
YUI Evt Mgr oDR causes browser to alert "unsecure"
By jay@moduscreate.com in forum Ext 1.x: Help & DiscussionReplies: 13Last Post: 9 Dec 2006, 12:28 PM


Reply With Quote
