Jag har sex drop-down boxar, med <select><option> värden. jag vill att dagen år/månad/datum ska bli default. Är detta något??Datum
vilket de första tre ska visa år/månad/datum och de andra tre ska visa
år/månad/datum två veckor framåt.
Jag har plockat dagens år/månad/datum så jag har har de värderna i formatet ex: 2001 / 09 / 27 Sv: Datum
<code>
<%
intYear1 = Year(Date)
intMonth1 = Month(Date)
intDay1 = Day(Date)
Response.Write "<SELECT name=year1>"
For iYear = 1990 To 2020
Response.Write "<OPTION"
If iYear = intYear1 Then Response.Write " Selected"
Response.Write ">" & iYear & "</OPTION>"
Next
Response.Write "</SELECT><SELECT name=month1>"
For iMonth = 1 To 12
Response.Write "<OPTION"
If iMonth = intMonth1 Then Response.Write " Selected"
Response.Write ">" & iMonth & "</OPTION>"
Next
Response.Write "</SELECT><SELECT name=day1>"
For iDay = 1 To 31
Response.Write "<OPTION"
If iDay = intDay1 Then Response.Write " Selected"
Response.Write ">" & iDay & "</OPTION>"
Next
Response.Write "</SELECT><p>"
varDate = DateAdd("ww",2,Date)
intYear2 = Year(varDate)
intMonth2 = Month(varDate)
intDay2 = Day(varDate)
Response.Write "<SELECT name=year2>"
For iYear = 1990 To 2020
Response.Write "<OPTION"
If iYear = intYear2 Then Response.Write " Selected"
Response.Write ">" & iYear & "</OPTION>"
Next
Response.Write "</SELECT><SELECT name=month2>"
For iMonth = 1 To 12
Response.Write "<OPTION"
If iMonth = intMonth2 Then Response.Write " Selected"
Response.Write ">" & iMonth & "</OPTION>"
Next
Response.Write "</SELECT><SELECT name=day2>"
For iDay = 1 To 31
Response.Write "<OPTION"
If iDay = intDay2 Then Response.Write " Selected"
Response.Write ">" & iDay & "</OPTION>"
Next
Response.Write "</SELECT>"
%>
</code>
/Janne