EDITABLE Dropdown (ListBox/ComboBox):



Editable Drop down -by Subrata Chakrabarty.
FEATURES:

INSTALLATION and OPERATION:



DEMONSTRATION: First Option Editable

The FIRST option ( default : " --?-- " ) is Editable !!


Left Aligned,
VARIABLE WIDTH,
Left To Right Flow




Left Aligned,
FIXED WIDTH ...(on IE only),
Left To Right Flow




RIGHT Aligned,
FIXED Width ...(on IE only),
RIGHT TO LEFT FLOW




DEMONSTRATION: Last Option Editable

The LAST option ( default : " --?-- " ) is Editable !!


Left Aligned,
VARIABLE WIDTH,
Left To Right Flow




Left Aligned,
FIXED WIDTH ...(on IE only),
Left To Right Flow




RIGHT Aligned,
FIXED Width ...(on IE only),
RIGHT TO LEFT FLOW




SCRIPT: First Option Editable






References

--




-- Thank You !! --








Author: Subrata Chakrabarty



Declaration


EDITABLE Dropdown (ListBox/ComboBox)
JavaScript / HTML
(DropDown with any one option as Editable & the rest as readonly - for Netscape and Internet Explorer)


Website:

Target readers :

Keywords :

Technologies used: Javascript,HTML


AL_DLICK'; // Indicates that the Change in dropdown selected // option was due to a Manual Click } } } } } // Set the new edited string into the Editable option getdropdown.options[vEditableOptionIndex_D].text = vEditString; //getdropdown.options[vEditableOptionIndex_D].value = vEditString; //Use this line only if want to change the internal value too; else this line is not required. return false; } return true; } function fnKeyUpHandler_D(getdropdown, e) { fnSanityCheck(getdropdown); if(e.which) // Netscape { if(vSelectChange_D == 'AUTO_SYSTEM') { // if editable dropdown option jumped while editing // (due to typing of a character which is the first character of some other option) // then go back to the editable option. getdropdown[(vEditableOptionIndex_D)].selected=true; } var vEventKeyCode = FindKeyCode(e); // if [ <- ] or [ -> ] arrow keys are pressed, select the editable option if((vEventKeyCode == 37)||(vEventKeyCode == 39)) { getdropdown[vEditableOptionIndex_D].selected=true; } } } /*-------------------------------------------------------------------------------------------- Subrata Chakrabarty */