javascript - Enabling input field to enter value -


i have input field on form readonly disabled , want enable it.

case: in code there field accepts 14 digit number. number divided 2 parts:

  1. first part default value (53600184) , readonly disabled.

  2. second part 6 digit value enterable. please see below code:

    <input type="hidden" name="default" value="53600184" size="8" maxlength="8"> <input type="text" value="53600184" size="8" maxlength="8" readonly disabled> <input type="text" name="enterable" value="" size="6" maxlength="6">

now, want change `readonly disabled field enterable in way should allow me change last digit like:

e.g.

  1. 53600185
  2. 53600186 etc

is possible?

i suggest separate input field last digit.

<input name="readonlypart" readonly="yes" value="5360018" /> <input name="lastdigit" maxlength="1" value="4" /> 

then when process form, concatenate 2 form field values.

edit starts here

if there 3 possible values, simpler:

<select name="somenumber"> <option value = "53600184">display text option</option> <option value = "53600185">display text option</option> <option value = "53600186">display text option</option> </select> 

Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -