hi - have a combo that lists birth years that are no younger than 18 and no older than 75.
my problem is getting the combo to stay selected
when someone chooses a year.
i am requesting the value x_yearid,
but dont know how to put 'selected' after the option tag
when a year is chosen.
hope i am being clear - thanks again MG
my problem is getting the combo to stay selected
when someone chooses a year.
i am requesting the value x_yearid,
but dont know how to put 'selected' after the option tag
when a year is chosen.
hope i am being clear - thanks again MG
Code:
<%
x_yearidList = "<select name='x_yearid'><option value=''>Year</OPTION>"
currdate = date()
yearlimit = DateAdd("yyyy", -18, currdate)
yearlimit = (datepart("yyyy",yearlimit))
yearstart = yearlimit - 57
For x_yearid = yearstart to yearlimit
x_yearidList = x_yearidList & "<option value='" & x_yearid & "'"
x_yearidList = x_yearidList & ">" & x_yearid & "</option>"
Next
x_yearidList = x_yearidList & "</select>"
Response.Write x_yearidList
%>