metti nell'head questa funzioncina
richiamala all'onload della paginacodice:function AbilitaSubmit(){ ff = document.Informazioni ff.scelta.disabled = (ff.anno.options[ff.anno.selectedIndex].value==0)||(ff.mese.options[ff.mese.selectedIndex].value==0) }
e all'onchange della combo dei mesicodice:<body onload="AbilitaSubmit();">
codice:<% Set RecSet = Server.CreateObject("Adodb.Recordset") %> <p align="center"><font size="4">Libro Interattivo</font></p> <p align="center"><font size="4">[img]att.gif[/img]</font></p> <form Name="Informazioni" method="post" action="libro.asp"> <input type="hidden" Name="Azione" Value="Ricerca"> <div align="center"> <center> <table Width="500"> <tr> <td nowrap width="250"> <p align="center"><font Size="2">Anno: <select id="anno" name="anno" onchange="return Cliccato()"> <option Value="0">Selezionare un Anno</option> <% RecSet.Open "Select anno From cronologia Group By anno Order by anno", Db,0,1 While not RecSet.EOF%> <option Value="<%=RecSet("anno")%>" <%If cdbl(RecSet("anno")) = cdbl(Request("anno")) Then Response.Write " Selected "%>><%=RecSet("anno")%></option> <% RecSet.MoveNext Wend RecSet.Close %> </select></font></p> </td> <td nowrap width="250"> <p align="center"><font Size="2">Mese: <select id="mese" name="mese" onchange="AbilitaSubmit()"> <option Value="0">Selezionare un Mese</option> <%If Request("anno") = 0 Then%> <option Value="0">Selezionare un Mese</option> <%Else RecSet.Open "Select * from cronologia Where anno = " & Request("anno") & " " , Db, 0,1 while not RecSet.EOF%> <option Value="<%=RecSet("mese")%>"><%=RecSet("mese")%></option> <% RecSet.MoveNext Wend RecSet.Close End If%> </select></font><input type="submit" name="scelta" value="Vai!"> </p> </td> <%db.Close%> </tr> </table> </center> </div> </body>![]()

Rispondi quotando