supportAB
asked on
create dynamic dropdown in HTA with VBSCRIPT
hi,
i am trying to populate a drop down in a HTA with VBScript. I am lost on how to pass the values from the script to the SELECT in HTML. i would appreciate any help with passing the values to the HTML dropdown
thanks
i am trying to populate a drop down in a HTA with VBScript. I am lost on how to pass the values from the script to the SELECT in HTML. i would appreciate any help with passing the values to the HTML dropdown
thanks
<html>
<head>
<title>create</title>
<HTA:APPLICATION
APPLICATIONNAME="Create Accounts"
Borderstyle="raised"
Border="thin"
ICON="Globe.ico"
SCROLL="yes"
SYSMENU="yes"
VERSION="1.4"
SINGLEINSTANCE="yes"
WINDOWSTATE="maximize"
>
<script LANGUAGE="VBScript">
On Error Resume Next
sub populatename()
Dim fso, folder, files, NewsFile,sFolder
Set fso = CreateObject("Scripting.FileSystemObject")
sFolder = "\\server\share"
If sFolder = "" Then
Wscript.Echo "Path Does Not Exist"
Wscript.Quit
End If
Set folder = fso.GetFolder(sFolder)
Set files = folder.Files
For each folderIdx In files
msgbox folderIdx.Name
Next
End Sub
</script>
</HEAD>
<BODY>
<B><FONT color=#107FAC>User/Group Location:<TD><select NAME=OULocation
<option value="">
<option value="nill">-- Select Location --
<option value="city1">city1
<option value="city2">city2
<FORM NAME="Create">
/FORM>
</BODY>
</HTML>
ASKER
thanks, perfect, thank you. one more question. now, when i select one of the citys from the dropdown how do i set the <option value=>?
for example:
normally it would be:
<option value="city">
<option value="city1">
how can i set the option value=
thanks
for example:
normally it would be:
<option value="city">
<option value="city1">
how can i set the option value=
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you for all your help
No problem. Thanks for the grade.
Regards,
Rob.
Regards,
Rob.
Regards,
Rob.
Open in new window