milanz
7 Sep 2007, 6:33 AM
I'm using extjx-1.1. I'm simply trying to add combobox items on the fly after a user clicks a "Filter Data" button. This way users have a history of the parameters they entered. However, my code below does not seem to work. It takes two clicks to "btnFilter_onClick" inorder for the item to be added and mozilla throws an error. Seems to be consistent in all browsers. Mozilla throws the following error:
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]
init : function() {
...
this.lastName = new Ext.form.ComboBox({
transform: 'lastName',
typeAhead: true,
triggerAction: 'all',
emptyText: '%',
width:130,
mode: 'local',
displayField: 'text',
valueField: 'text',
store: new Ext.data.SimpleStore({
fields: ['text'],
data : [
['Test1'],
['Test2']
]
})
});
...
}
btnFilter_onClick : function(e) {
...
var it = Simple.lastName.getRawValue();
Simple.lastName.store.insert(0, new Ext.data.Record({text: it}));
}
Thanks for the help. Starting to pull my hair on this one :D
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]
init : function() {
...
this.lastName = new Ext.form.ComboBox({
transform: 'lastName',
typeAhead: true,
triggerAction: 'all',
emptyText: '%',
width:130,
mode: 'local',
displayField: 'text',
valueField: 'text',
store: new Ext.data.SimpleStore({
fields: ['text'],
data : [
['Test1'],
['Test2']
]
})
});
...
}
btnFilter_onClick : function(e) {
...
var it = Simple.lastName.getRawValue();
Simple.lastName.store.insert(0, new Ext.data.Record({text: it}));
}
Thanks for the help. Starting to pull my hair on this one :D