PDA

View Full Version : Again Chrome Trouble



Mycoding
26 Jan 2011, 11:47 PM
I don't know what it is.
I have extention of window and just can't run it Chrome, althoug only yestaday it worked.

I get such error
Uncaught TypeError: undefined is not a function

Here is extention


Ext.ns("Vreshenie.window");

Vreshenie.window.UserLoginWindow = Ext.extend(Ext.Window, {
initComponent : function() {
var formItemDefaults = {
allowBlank : false,
anchor : '-5'
};

var form = new Ext.FormPanel({
defaultType : 'textfield',
labelWidth : 70,
frame : true,
monitorValid:true,
url:'request/user-login/user-login.php',
labelAlign : 'right',
defaults : formItemDefaults,
items : [{
fieldLabel : '???',
blankText :'??????? ???',
name : 'login'
},{
fieldLabel : '??????',
blankText :'??????? ??????',
inputType : 'password',
name : 'parol'
}],
buttons : [{
text : '????',
iconCls: 'icon-key',
formBind: true,
handler:function(){
form.getForm().submit({
method:'POST',
waitTitle:'?????????? ? ????????',
waitMsg:'???????? ??????...',
success:function(form, response){
console.dir(form);
var json = response.result;
if(json.success == true){
Ext.Msg.alert('????? ???????', '????? ? ?????? ?????', function(btn, text){
var expires = new Date(json.end_date*1000);
Ext.util.Cookies.set('login',form.getValues().login,expires);
Ext.util.Cookies.set('user_id_session',json.user_id_session,expires);
Ext.util.Cookies.set('group',json.group,expires);
location.href='';
});
}
else {Ext.Msg.alert('????? ???????', '?? ??????????????? ????? ???????', function(btn, text){});}
},
failure:function(form, response){
var json = response.result;
if(json.success == false){Ext.Msg.alert('????? ???????',json.error);}
else{Ext.Msg.alert('????? ???????', '?? ??????????????? ????? ???????.');}
}
});
}
}]
});

Ext.apply(this,{
layout:'fit',
iconCls: 'icon-key',
width:280,
height:130,
plain: true,
closable:false,
modal:true,
resizable:false,
//animateTarget:Ext.getBody(),
items:form
});
Vreshenie.window.UserLoginWindow.superclass.initComponent.call(this);
}
});


An here is how i run it


new Vreshenie.window.UserLoginWindow().show();


In Firefox all works good. In other I don't test