I am applying some formatting to input made inside a text box in a web page.
<input style="text-transform: uppercase"
type="text"
class="textbox"
id="code"
name="code"
D_LABEL="code"
beanProperty="code"
value=""
D_MANDATORY="true"
maxlength="10"/>
This works fine. I am saving the value in a database. However the value saved is not in upper case. How do save the same value as it appears on the text box at the time of capture?
The above answers point you in the right direction . You can simply convert the input box text to uppercase in javascript before sending the data to server. Use
<string>.toUpperCase()method to achieve the conversion