| eComboBox |
|
eComboBox - a jquery plugin to generate editable ComboBoxes:
simple usage:
$("#cb").eComboBox();
Examplesarrow keys : navigate through combo box
enter key : confirm new or edited element and return to non-editing mode delete key : remove selected element (except {NEW ELEMENT}) Example 1Code: $("#editable").eComboBox();
Example 2Options:allowNewElements : false editableElements : true Code: $("#editable2").eComboBox({
'allowNewElements' : false, // default : true
'editableElements' : true // default : true
});
Example 3Options:allowNewElements : true editableElements : false Code: $("#editable3").eComboBox({
'allowNewElements' : true, // default : true
'editableElements' : false // default : true
});
Buttons to enable/disable options |
Kommentare
I included min.js earlier and cant find inputelement etc.. now i included jquery.eComboBox.js and its working fine in Chrome.
Thanks
Regards,
Krish
The 'change' event uses 'bind' to take all input changes; select-one, radio etc
But with eComboBox under IE9, the e.target.form is null when select-one is changed.
eComboBox event reporting is Ok with Firefox and chrome. Also, a standard select-one is Ok on IE9.
inputElement.blur(function(e ) {
//if(e.keyCode == 13){ //enter
if(selected=="{NEW ELEMENT}" ){
if ($(this).val() != ""){
selectElement.append(
''+$.trim($(this).val())+'');
selectElement.val($(this).val());
}
}else{
if( $(this).val() == "" ) {
selectElement.children( 'option:selected ').remove();
}else{
selectElement.children( 'option:selected ').text($(this).val());
}
}
$(this).hide();
selectElement.focus();
//}
resizeElements( );
});
There is no need to process every keystroke (keyup) since we only want to know when the input is complete (blur).
Help please! Thank you.
This appears to be a solid & lightweight component.
Thank you for posting this!
was the init so placed with the initial observers.
This is obviously wrong as I get just text 'Value 1..4' and no select box graphic is created for the combo box.
Also, looking at the Examples on the site, HOW can the entry be Edited? I have tried various key strokes but no edit; only DELete (assumes edit enabled)
I know that this works, but am stuck at the moment.
Sorry for the post in English, but cannot speak German.
Alle Kommentare dieses Beitrages als RSS-Feed.