• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Html basic question

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have a doubt in

<input type="text">



In Combo or drop down box we have the

<option value="1">Arabic<option>.
<option value="2">ereric<option>


can we achieve the same in text box?Like value and content of the text box.
This is in dynamic scenario, i mean the values.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thats not the matter in case of textbox. Because textbox can be referred by its name, wherein combo or drop down box it has a single name for the list.
Hence all the options are given some values to get referred or uniquely identify it from the list. hence the use.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no such thing as a "combo box" in HTML. Read HtmlHasNoComboBox.

You can use the value attribute on the text element to assign its initial value.
 
hariharan jayaprakash
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am having the scenario, in which my jsp page retrieves both id and value from the form bean.

In case of drop down am using both id and value,based on taglib.

For eg: <option value ="1">Arabic<option>
Here id is 1 and value is Arabic.....

but in case of text box, i am unable to store the id.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
id values are not submitted as part of the request. The name attribute is used to identify the value.
 
hariharan jayaprakash
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yeah you are rite.. then am doing wrong.
i am trying with html tags in struts...
 
reply
    Bookmark Topic Watch Topic
  • New Topic