PDA

View Full Version : Error: window.attachEvent is not a function



totl
15 Aug 2007, 5:13 AM
Error: window.attachEvent is not a function
Source File: http://localhost/myform/js/ext-base.js
Line: 12

What is this error?

It wasn't showing before I installed firebug. Right after I've installed firebug this error started to come up and all my applications are messed up. They do work, but look ugly.

As a matter of fact this happens only in FireFox. IE, Opera both show everything fine. Moreover on the other machine where FireBug is not installed Firefox does not display this error and everything shows up fine.

Does anyone know what's going on?

I did search the forum thoroughly, however couldn't find anything similar.
Thank you.

totl
15 Aug 2007, 6:12 AM
any thoughts?

Animal
15 Aug 2007, 6:16 AM
I suspect it's something in your code. Show us your code.

totl
15 Aug 2007, 6:26 AM
No need to do that animal. Thanks for your help though.
Believe it or not, but I reinstalled FireFox and everything works fine now. The error doesn't come up.

By the way here's my code:

mycountries.js



Ext.onReady(function(){

var signup_form = new Ext.form.Form({
labelAlign: 'left'
});

signup_form.fieldset(
{legend:'Geographical Information'},

new Ext.form.ComboBox({
fieldLabel: 'Country*',
hiddenName:'country',
store: new Ext.data.SimpleStore({
fields: ['abbr', 'full_name'],
data : countries_list // from states.js
}),
displayField:'full_name',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'Select a country...',
selectOnFocus:true,
allowBlank:false,
width:280
})
);
signup_form.render('my_form');
});


I am pretty sure it has something to do with fire bug. As soon as I got it installed the whole thing just got messed up.

Admins, feel free to remove this thread