Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • 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
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

List choices.......

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having a web page which uses html tag for selecting a list of choices, let's say all the US states. This tag does not provide the option for the user to enter the data ie other than US states, it only select's the choices available. could any one help me out to have this feature. I think javascript might help here. Could some one help me with javascript.
Any help would be appreciated.
Thanks,
 
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<FORM>
<SELECT NAME="" SIZE="1">
<OPTION VALUE="1" SELECTED>This is the one</OPTION>
<OPTION VALUE="2">Two</OPTION>
<OPTION VALUE="3">Three</OPTION>
<OPTION VALUE="4">Four</OPTION>
<OPTION VALUE="5">Five</OPTION>
<OPTION VALUE="6">Six</OPTION>
<OPTION VALUE="7">Seven</OPTION>
<OPTION VALUE="8">Eight</OPTION>
<OPTION VALUE="9">Nine</OPTION>
<OPTION VALUE="10">Ten</OPTION>
</SELECT>
</FORM>
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tony ,
I understand that Html tag does allow to have different options as you have shown above, but it does not allow the user to enter the data in this list box, always allows the user to only select the options, but cannot enter his own data. My question is, how can i have the feature of both able to select the list options as well as the user is able to type his own data in the same select list option box. I somehow think that this can be done using javascript. If any one could help me out, i would appreciate.
Thanks,
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The usual way to do this is to have a standard text entry field with a link, image, or button beside it which "pops up" a list of choices. When any of the pop-up choices is clicked, some Javascript puts that value into the field.
There is no simple Form element that has this behaviour.
 
Slime does not pay. Always keep your tiny ad dry.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!