All Forums >> [Scripting] >> WSH & Client Side VBScript >> How do i remove an item from HTA list box? Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
I am kind of new to HTA and looking to dynamically populate a list box and have two control buttons.
One control butoon will add a selected item to another emty list box, but i cant seem to work out the method needed to remove a selected item from the second list box.
Here is my code so far, can any kind soul show me what method i need?
Thanks,
SH
<html> <head> <title>Server Task Scheduler</title> <HTA:APPLICATION APPLICATIONNAME="Create Task" SCROLL="yes" SINGLEINSTANCE="yes" > </head> <script language="vbscript"> <!-- Insert code, subroutines, and functions here --> Sub Window_Onload Set objNetwork = CreateObject("Wscript.Network") strComputer = objNetwork.ComputerName
Next End Sub Sub Add() Set objOption = Document.createElement("OPTION") objOption.Text = optUsers.value objOption.Value = optUsers.value optUsersToDo.Add(objOption) End Sub Sub Remove() ' what goes here? End Sub </script> <body> <table border="1"> <tr> <td> <select size="8" style="width:200px"name="optUsers"></select> </td>