Skip to content Skip to sidebar Skip to footer

Can I Insert My Own Option In Select Tag

which tag to use if i want to select an option from dropdown as wel as i can insert my own option. using jsp can i do it? i m able to fetch the complete list to serve as option but

Solution 1:

I think I understand this question.

You are saying you have a select populated from server side JSP, but once the list is populated you would like to be able to add more options manually, by typing them in, almost like a combo-box?

There is a Microsoft Active X control that does this, but I would avoid this at ALL costs, simply because its not cross browser compatible.

You could try roll your own control, or look at the following:

Pay special attention to that last link, it uses jQuery so should be easy enough to implement. Ofc you're going to have to use some custom JSP to populate the control, but it should give you the desired effect.

http://steveorr.net/articles/combobox.aspx

http://www.codeproject.com/KB/custom-controls/combobox.aspx

http://www.thunderguy.com/semicolon/2009/07/16/simple-combo-box-jquery-plugin/

Post a Comment for "Can I Insert My Own Option In Select Tag"