Je cherche à linker les boutons d'une page hta a une liste deroulante dynamique voila mon sript:
<html>
<head>
<META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes" />
<title>Liste</title>
<HTA:APPLICATION
ICON="icone.ico"
ID="objAutoRefresh"
APPLICATIONNAME="toto"
SCROLL="no"
SINGLEINSTANCE="yes"
>
</head>
<script language="VBScript">
Sub Window_OnLoad
ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile _
("C:\Liste.txt", ForReading)
Do Until objFile.AtEndOfStream
strLine = objFile.ReadLine
Set objOption = Document.createElement("OPTION")
objOption.Text = strLine
objOption.Value = strLine
Liste.Add(objOption)
Loop
objFile.Close
End Sub
</script>
<body >
<INPUT TYPE="button" ONCLICK="window.close()" VALUE="Fermer"> <br>
<select size="1" name="Liste" style="width:250" ><option>SELECTIONNER</option></select>
<br>
<INPUT TYPE="button" VALUE="Visualisation" onClick="SW.ShellExecute('');">
</body>
</html>
Je creer une liste dynamique à partir d'un fichier texte palcer dans C:/txt.txt
Le gros soucis, c'est que je ne sais pas comment linker le resultat de la selection de l'utilisateur pour faire mon traitement avec onClick="SW.ShellExecute ?
Merci pour votre aide :)