omdb
30 Aug 2007, 6:00 AM
Hi ..
i've got a ComboBox with a hidden-field and a store doing auto-completion via ajax calls. Now i got a onSelect function, looking like that:
onSelect: function(record){
var name = record.get('name');
var id = record.get('id');
this.setValue(name);
this.collapse();
}
now the setValue() method sets the value and the value of the hidden field, which is perfectly fine. But i want to submit the id, but display the name. I can set the hiddenValue directly by calling "this.hiddenField.value = id;" but i thought it would be nice to have a setHiddenValue() method. Or is there any other way to do it?
Ben
i've got a ComboBox with a hidden-field and a store doing auto-completion via ajax calls. Now i got a onSelect function, looking like that:
onSelect: function(record){
var name = record.get('name');
var id = record.get('id');
this.setValue(name);
this.collapse();
}
now the setValue() method sets the value and the value of the hidden field, which is perfectly fine. But i want to submit the id, but display the name. I can set the hiddenValue directly by calling "this.hiddenField.value = id;" but i thought it would be nice to have a setHiddenValue() method. Or is there any other way to do it?
Ben