how to update option selects by date?

# Thread: how to update option selects by date?

1. wd
Senior Member
Join Date
Dec 1969
Posts
141

## how to update option selects by date?

need to set option selected of months by current month and have it change when the month changes. anyone

2. Senior Member
Join Date
Dec 1969
Posts
96,118

## RE: how to update option selects by date?

&#060;SELECT Name="theMonth"&#062;<BR>&#060;% <BR>For m = 1 To 12<BR>&nbsp; &nbsp; If m = Month(Date) Then sel=" SELECTED " Else sel=""<BR>&nbsp; &nbsp; Response.Write "&#060;OPTION Value=" & m & sel & "&#062;" & MonthName(m) <BR>Next<BR>%&#062;<BR>&#060;/SELECT&#062;<BR>

3. wd
Senior Member
Join Date
Dec 1969
Posts
141

## RE: how to update option selects by date?

so then I would just have to make each month equal to 1-12 then and it should all work, right?

4. Senior Member
Join Date
Dec 1969
Posts
96,118

## What else would you use?

Would you have January be 73, instead???<BR><BR>But if you are asking if you have to use &#060;OPTION Value=1&#062; instead of &#060;OPTION Value="January"&#062; or &#060;OPTION Value="Jan"&#062; then the answer is "of course not." What you put in for the VALUE= is entirely up to you.<BR><BR>

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•