Search code examples
jqueryasp-classicxhtmlhtml4

Select "other" from the selectbox and activate textfield


I have a question based on my selectbox:

     <select name="Companies" id="Companies">
         <option value="" selected="selected"></option>
         <option value="AB-CityNY">AB, New York</option>
         <option value="AB-CityWAS">AB, Washington</option>
         <option value="AB-CityLON">AB, London</option>
         <option value="CD-CityStockholm">CD, Stockholm</option>
         <option value="EF-CityBerlin">Rome Company, North</option>
         <option value="EF-CityRome">Rome Company, South</option>
         <option value="GH-CityMadrid">Madrid Company</option>
         <option value="Other">Fill out the textfield</option>
     </select>
     <input type="text" name="ActivateOther" size="25" class="required" />

Of course I need all information posted to my next page (which is in ASP Classic) no matter if it is from the selectbox or textfield, but it is also okay if the selectbox sends the option-value to the "ActivateOther"-textfield, so I only have one field to work with on the next page. The page already has jQuery in use.


Solution

  • Thanks for trying to answer my question. I found this to be the solution to my question (even though there is no read-only solution):

    Show a text field on a specific option select