tulsantide
Technical User
Hi,
I'm trying to populate values in a list box dynamically on loading HTA. I have the following code, which is giving me an error. Please let me know if I'm doing anything wrong. Thanks!
#######################################################################
<html>
<head>
<title>Users</title>
<HTA:APPLICATION
APPLICATIONNAME=”Users”
SCROLL=”yes”
SINGLEINSTANCE=”yes”
WINDOWSTATE=”maximize”
>
<SCRIPT Language=”VBScript”>
Sub Users_Onload()
a = Array("user1","user2","user3","user4")
For Each User In a
Set objOption = Document.createElement(“OPTION”)
objOption.Text = User
objOption.Value = User
Users.Add(objOption)
Next
End Sub
</SCRIPT>
</head>
<body onload="Users_Onload">
<select id="Users" size=”4" name=Users>
</select>
</body>
</html>
I'm trying to populate values in a list box dynamically on loading HTA. I have the following code, which is giving me an error. Please let me know if I'm doing anything wrong. Thanks!
#######################################################################
<html>
<head>
<title>Users</title>
<HTA:APPLICATION
APPLICATIONNAME=”Users”
SCROLL=”yes”
SINGLEINSTANCE=”yes”
WINDOWSTATE=”maximize”
>
<SCRIPT Language=”VBScript”>
Sub Users_Onload()
a = Array("user1","user2","user3","user4")
For Each User In a
Set objOption = Document.createElement(“OPTION”)
objOption.Text = User
objOption.Value = User
Users.Add(objOption)
Next
End Sub
</SCRIPT>
</head>
<body onload="Users_Onload">
<select id="Users" size=”4" name=Users>
</select>
</body>
</html>