tags:

views:

33

answers:

1

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 i want to insert my own option as wel. what is the convenient technique using jsp? i mean like the way we insert into text box. i have seen in some sites that they provide options to choose and in one of the option you can fill ur own value plz help

+1  A: 

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/

JL