Bonjour,
Je commence la programmation en asp et vbscript et je n'arrive pas a reccuperer la valeur de ma selection d'un menu deroulant dans une fonction.
Voici le source :
<%@ Language=VBScript %>
<%
dim ville1
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "base"
sqlville = "select ville from archive group by ville"
set RSville = Conn.Execute(sqlville)
RSville.movefirst
%>
<html>
<head>
<meta name="VI60_defaultClientScript" content="VBScript">
<meta NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<SCRIPT LANGUAGE="VBScript">
dim ville2
Sub Arr ()
<%ville2 = Request.Form("ListeVill")%>
Alert(ville2)
End Sub
</SCRIPT>
</head>
<body bgcolor="#FFFFFF">
<p><%'=sqlville%></p>
<form ACTION="recherche1.asp" METHOD="post" id="form1" name="form1">
<table border="0" cellspacing="0" align="center">
<tr><td>
<table border="0" cellspacing="5" align="center" cellpadding="0">
<tr>
<td height="40"><div height="19" align="left" style="width: 82; height: 19"><font face="Arial" color="black" size="2"><strong>Ville </div>
</strong></font>
</td>
<td height="40">
<select name="ListeVil" onChange='Arr()'>
<option selected value="*">Sélectionnez ... <% while not RSville.eof %>
<option value="<%=RSville("ville")%>"><%=RSville("ville")%> <%
RSville.movenext
wend
RSville.close
%>
</select>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
Merci d'avance
Warrax