Passo alla prossima domanda:
CHE ERRORE C'E' CHE NON RIESCO A TROVARE NULLA????
Non mi da errore sulla pagina però funziona come dovrebbe perchè quando cambio il select del mese rimane sempre quello corrente.
codice:
<%
mese = MonthName(month(data))
lettera = ucase(mid(mese,1,1))
mese = lettera & mid(mese,2,len(mese))
anno = year(data)
%>
<form name='selectAnno' ID=Form1>
<SELECT id='mese' size='1' onchange='cambiaMeseAnno()' style="font : bold 10pt arial;color=#004080">
<%
for i = 1 to 12
nomeDelMese = MonthName(month("01/" & i & "/04"))
lettera = ucase(mid(nomeDelMese,1,1))
nomeDelMese = lettera & mid(nomeDelMese,2,len(nomeDelMese))
%>
<OPTION VALUE=<%=nomeDelMese%>> <%=nomeDelMese%>
<%
next
%>
</select>
<select name='anno' size='1' onchange='cambiaMeseAnno()' style="font : bold 10pt arial;color=#004080;width:60;">
<%
for i = 1900 to 2100
%> <option value=<%=i%>> <%=i%>
<%
next
%> </select>
</td></form>
----------------------------------------------------
<script language="vbscript">
<% if data > "" then
mese1 = month(data) - 1
anno1 = year(data) - 1900
%>
meseCorrente = <%=mese1%>
annoCorrente = <%=anno1%>
document.selectAnno.mese.selectedIndex = meseCorrente
document.selectAnno.anno.selectedIndex = AnnoCorrente
<% else %>
meseCorrente = month(date()) - 1
annoCorrente = year(date()) - 1900
document.selectAnno.mese.selectedIndex = mesecorrente
document.selectAnno.anno.selectedIndex = AnnoCorrente
<% end if%>
function cambiaMeseAnno()
meseSelezionato = document.selectAnno.mese.selectedIndex + 1
annoSelezionato = document.selectAnno.anno.selectedIndex + 1900
giornoSelezionato = <%=day(data_sel)%>
window.top.location.href="calendario1.asp?data=" & giornoSelezionato & "/" & meseSelezionato & "/" & annoSelezionato & ""
end function
function precedente()
document.selectAnno.mese.selectedIndex = document.selectAnno.mese.selectedIndex - 1
end function
function successivo()
document.selectAnno.mese.selectedIndex = document.selectAnno.mese.selectedIndex + 1
end function
</script>