• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

comboboxes /listboxes in jsp

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey.

can sumone help me out here pls?

im trying to create a dropdown box which also allows the user to type in values..

in general the <select> statement is by default just a drop down and dosnt allow users to input..

the reason is because i have a huge date list from a database and i wouldnt want my users to sit and go through the date to find which one they want...

looking fwd to replies..

rightnow my code is:

........
<select name="date2">
<%while(recresult.next()){%>

<option><%=recresult.getString(1)%></option>

<%}%>
</select> </td> </tr>
 
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nothing to do with JDBC if you want to add something in your combobox.

JavaScript will solve your problem !!

Ask User to provide text and value for combo and add the same to combo something like



I haven't tested this code but this work ,I wrote similar code long back,I have written this to give you idea.

Shailesh
 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think what you are looking for is a typehead combo box.
do some googling and you will find loads of links which will help you.
Here are some i found.

Google Link


One more.


OK last one.


the internets an amazing place. please explore it.
[ July 20, 2005: Message edited by: Niki Nono ]
 
Seriously Rick? Seriously? You might as well just read this tiny ad:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!