Ho scomposto il valore di una data in 3 select in modo da poterla modificare, non capisco come non mi funziona il "selected" nella select dell'anno mentre per il giorno e il mese lo script mi lascia selezionato il valore della data memorizzata. La terza tendina mi appare sempre al primo valore (2004) anche se rs(data) è ad esempio 21/05/2005
Vi prego di aiutarmi perchè non so ch epesci predere....
ecco lo script:
codice:
<% data = rs("data")
gg_ = Left(data,2)
mm_ = Mid(data,4,2)
aaaa_ = Right(data,4)
%>
<select name="gg">
<% for i = 1 to 31
if i < 10 then i = 0 & i end if %>
<option value="<%= i %>" <% if i = gg_ then response.Write("selected") end if %>><%= i %></option>
<% Next %>
</select>
<select name="mm">
<% for g = 1 to 12
if g < 10 then g = 0 & g end if %>
<option value="<%= g %>" <% if g = mm_ then response.Write("selected") end if %>><%= g %></option>
<% Next %>
</select>
<select name="aaaa">
<% for h = 2004 to 2010 %>
<option value="<%= h %>" <% if h = aaaa_ then response.Write("selected") end if %>><%= h %></option>
<% Next %>
</select>