setting variable inline a script line

wxdqz

New Member
I am building a dynamic JS form.
I created three drop down fields in the body as follows

1. BS graduation date
2. MS graduation date
3. Phd graduation date

<form NAME="selectdate">
<script> gradDate("BS");</SCRIPT><br>
<script> gradDate("MS");</SCRIPT><br>
<script> gradDate("PH");</SCRIPT>
</FORM>

the function gradDate will create the dropdown box for month and year.
I am also creating 3 hidden input fields.
I create date objects from the month and date drop down fields and assign the date to the hidden fields so that I can pass on to another page.

form.[hiddenfield].value = (grad.getMonth()+1) + "/" +grad.getDate() + "/" + (grad.getFullYear());

i declared hiddenfield as a variable. how can I put the variable inbetween "form" and "value"

thanks in advance
Prem
 
Back
Top