1. #1
    Ext JS Premium Member
    Join Date
    Mar 2007
    Posts
    194
    Vote Rating
    0
    INeedADip is on a distinguished road

      0  

    Default 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]

  2. #2
    Ext User
    Join Date
    Mar 2007
    Posts
    112
    Vote Rating
    0
    jeffiel is on a distinguished road

      0  

    Default


    Yes, I am seeing this too. Figure anything out?

  3. #3
    Ext JS Premium Member
    Join Date
    Mar 2007
    Posts
    194
    Vote Rating
    0
    INeedADip is on a distinguished road

      0  

    Default


    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...

  4. #4
    Ext User
    Join Date
    Mar 2007
    Posts
    112
    Vote Rating
    0
    jeffiel is on a distinguished road

      0  

    Default


    I also noticed that firebug doesn't stop on those "permission denied" exceptions. hard to track down.

  5. #5
    Ext User
    Join Date
    Mar 2007
    Posts
    12
    Vote Rating
    0
    alastairD is on a distinguished road

      0  

    Default


    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;
    	}
    };

  6. #6
    Ext User
    Join Date
    Mar 2007
    Posts
    12
    Vote Rating
    0
    alastairD is on a distinguished road

      0  

    Default


    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.

  7. #7
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    16
    Vote Rating
    1
    rodionos is on a distinguished road

      0  

    Default Local File

    Local File


    Are you loading the file from the local filesystem or doing cross-domain ajax call?

  8. #8
    Ext User amon's Avatar
    Join Date
    Apr 2007
    Location
    Budapest
    Posts
    109
    Vote Rating
    1
    amon is on a distinguished road

      0  

    Default


    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

  1. Newline equivilent in Ext.MessageBox.alert()
    By thejoker101 in forum Ext 2.x: Help & Discussion
    Replies: 9
    Last Post: 9 Apr 2010, 3:54 AM
  2. Only Alert Script from Message Dialogs
    By minoan in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 20 Mar 2007, 11:44 AM
  3. MessageBox alert and '\n'
    By cebola in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 13 Mar 2007, 5:25 AM
  4. Replace standart Alert dialog with ext.BasicDialog
    By Timoshka in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 29 Dec 2006, 11:52 AM
  5. YUI Evt Mgr oDR causes browser to alert "unsecure"
    By jay@moduscreate.com in forum Ext 1.x: Help & Discussion
    Replies: 13
    Last Post: 9 Dec 2006, 12:28 PM

Thread Participants: 4