M
M5v0h4y1
I'm both new to the group and am having a problem getting an option
value to update to user-input from a text box on the same form.
Here's what I'm trying to do:
this is a partial script from a dynamically set list menu - I'm only
concerned with getting the Other-Employer Not Listed option to read
input from the user input into the text box "employer_alternate".
<script>
document.write('<option
value="'+document.getElementsByName("employer_alternate")
[0].value+'"> Other - Employer Not Listed</option>')
</script>
<input name="employer_alternate" type="text" id="employer_alternate"
value="" size="70">
Whenever I try to read the value of "employer_alternate" into the
value for the listed option either nothing happens or when I try to do
it outside of javascript like this:
<option
value="javascript:document.getElementsByName("employer_alternate")
[0].value;"> Other - Employer Not Listed</option>
I simply get my javascript as text in my transfer to a database.
I suspect this is coding 101, yet need help.
Thank you.
value to update to user-input from a text box on the same form.
Here's what I'm trying to do:
this is a partial script from a dynamically set list menu - I'm only
concerned with getting the Other-Employer Not Listed option to read
input from the user input into the text box "employer_alternate".
<script>
document.write('<option
value="'+document.getElementsByName("employer_alternate")
[0].value+'"> Other - Employer Not Listed</option>')
</script>
<input name="employer_alternate" type="text" id="employer_alternate"
value="" size="70">
Whenever I try to read the value of "employer_alternate" into the
value for the listed option either nothing happens or when I try to do
it outside of javascript like this:
<option
value="javascript:document.getElementsByName("employer_alternate")
[0].value;"> Other - Employer Not Listed</option>
I simply get my javascript as text in my transfer to a database.
I suspect this is coding 101, yet need help.
Thank you.