sekaijin
27 Feb 2008, 2:26 AM
Hi
I'm trying to run the /ext-2.0.1/examples/forum/forum.html sample
but I'm get error on forum.js script on line 357
var search = new Ext.form.ComboBox({
store: searchStore,
displayField:'title',
typeAhead: false,
loadingText: 'Searching...',
width: 200,
pageSize:10,
listWidth:550,
hideTrigger:true,
tpl: resultTpl,
minChars:3,
emptyText:'Quick Search',
onSelect: function(record){ // override default onSelect to do redirect
window.location =
String.format('http://extjs.com/forum/showthread.php?t={0}&p={1}', record.data.topicId, record.id);
}
});
// apply it to the exsting input element
search.applyTo('search'); //LINE : 357
At this time search is not an "Ext.form.ComboBox" object but is an Input element tha does not know the applyTo method.
I've rename the input to searchBox and changed the line 357 to
search.applyTo('searchBoX'); //LINE : 357
Now the search var is an Object and searchBox an input
I'm trying to run the /ext-2.0.1/examples/forum/forum.html sample
but I'm get error on forum.js script on line 357
var search = new Ext.form.ComboBox({
store: searchStore,
displayField:'title',
typeAhead: false,
loadingText: 'Searching...',
width: 200,
pageSize:10,
listWidth:550,
hideTrigger:true,
tpl: resultTpl,
minChars:3,
emptyText:'Quick Search',
onSelect: function(record){ // override default onSelect to do redirect
window.location =
String.format('http://extjs.com/forum/showthread.php?t={0}&p={1}', record.data.topicId, record.id);
}
});
// apply it to the exsting input element
search.applyTo('search'); //LINE : 357
At this time search is not an "Ext.form.ComboBox" object but is an Input element tha does not know the applyTo method.
I've rename the input to searchBox and changed the line 357 to
search.applyTo('searchBoX'); //LINE : 357
Now the search var is an Object and searchBox an input