Re: Using drop down to chagnge value of hidden form field
- From: "shimmyshack" <matt.farey@xxxxxxxxx>
- Date: 30 Mar 2007 18:55:14 -0700
On Mar 31, 2:35 am, njbigNOS...@xxxxxxx (Noah) wrote:
Hello.
I have a form like so:
<FORM NAME="form1" METHOD = "post">
<SELECT NAME="select">
<OPTION VALUE = "1">Option 1</OPTION>
<OPTION VALUE = "2">Option 2</OPTION>
<OPTION VALUE = "3">Option 3</OPTION>
</SELECT>
<INPUT TYPE="HIDDEN" NAME="METHOD" VALUE=""
</FORM>
Depending on which option value the user selects, I need to change the
VALUE="" part of the hidden field "METHOD" to the value of the selected
option (1, 2 or 3).
How do I do that? Thanks.
<FORM NAME="form1" METHOD="post">
<SELECT NAME="select"
onchange="document.getElementById('METHOD').value=this.options[this.selectedIndex].value">
<OPTION VALUE = "1">Option 1</OPTION>
<OPTION VALUE = "2">Option 2</OPTION>
<OPTION VALUE = "3">Option 3</OPTION>
</SELECT>
<INPUT TYPE="HIDDEN" ID="METHOD" NAME="METHOD" VALUE="" >
</FORM>
.
- References:
- Prev by Date: Re: Using drop down to chagnge value of hidden form field
- Next by Date: how to know whether the webpage is the top active IE window with javascript code
- Previous by thread: Re: Using drop down to chagnge value of hidden form field
- Next by thread: how to know whether the webpage is the top active IE window with javascript code
- Index(es):