Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- How to fill a <input type="hidden"> using Javascript


Wicketywick - 10:59 am on Oct 29, 2009 (gmt 0)


I want to complete my form with a bit of Javascript (which I know next to nothing about, to fill out a hidden input field).

The input field is:

<input type="hidden" name='field[537,0]' value='' />

the dropdown selection positions are:

<select name='field[539,0] >
<option value='Herr'>Herr</option>
<option value='Frau'>Frau</option>

the command I am looking for would be:

if "Herr" is selected, add "sehr geehrter" to
"field[537,0]" and if "Frau" is selected add "sehr geehrte".

How does that get done?


Thread source:: http://www.webmasterworld.com/javascript/4015512.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com