Hello,
I need to create an editable dropdown list box on an HTA form.
I found the html and javascript code that will do the editable dropdown listbox which is listed below which works fine. However, I like to know how I can convert the code to use vbscript instead of javascript.
Any help will be greatly appreciated.
**************** Code sample *******************
<html>
<head>
<title>Editable Dropdown</title>
<HTA:APPLICATION
ID="objScriptFromText"
APPLICATIONNAME="EditableDropdown"
MAXIMIZEBUTTON="no"
MINIMIZEBUTTON="no"
SCROLL="auto"
SINGLEINSTANCE="yes"
ICON = "ICON.ICO"
>
</head>
<script type="text/javascript">
function displaytxtbox(x)
{
var displaytxtbox="txtbox"+x;
var displaytxtbox=document.all(displaytxtbox);
displaytxtbox.style.display="";
}
function removelist(x)
{
var removelist="list"+x;
var useremovelist = removelist;
var removelist=document.all(removelist);
removelist.style.display="none";
}
function zipcode(a)
{
if (a == "NEW") {
removelist(1);
displaytxtbox(1);
document.OrganizationForm.zip_code.value='';
}
}
</script>
<body bgcolor="buttonface">
<form name="OrganizationForm">
<input type="text" name="zip_code" size="10" id="txtbox1" style="display: none;">
<select style="width: 90px;" name="choose_zip_code" id="list1" onChange="zipcode(this.form.choose_zip_code.value);return true;">
<option value="60601">60601</option>
<option value="77777">77777</option>
<option value="NEW">NEW</option>
</select>
</form>
</body>
</html>
I need to create an editable dropdown list box on an HTA form.
I found the html and javascript code that will do the editable dropdown listbox which is listed below which works fine. However, I like to know how I can convert the code to use vbscript instead of javascript.
Any help will be greatly appreciated.
**************** Code sample *******************
<html>
<head>
<title>Editable Dropdown</title>
<HTA:APPLICATION
ID="objScriptFromText"
APPLICATIONNAME="EditableDropdown"
MAXIMIZEBUTTON="no"
MINIMIZEBUTTON="no"
SCROLL="auto"
SINGLEINSTANCE="yes"
ICON = "ICON.ICO"
>
</head>
<script type="text/javascript">
function displaytxtbox(x)
{
var displaytxtbox="txtbox"+x;
var displaytxtbox=document.all(displaytxtbox);
displaytxtbox.style.display="";
}
function removelist(x)
{
var removelist="list"+x;
var useremovelist = removelist;
var removelist=document.all(removelist);
removelist.style.display="none";
}
function zipcode(a)
{
if (a == "NEW") {
removelist(1);
displaytxtbox(1);
document.OrganizationForm.zip_code.value='';
}
}
</script>
<body bgcolor="buttonface">
<form name="OrganizationForm">
<input type="text" name="zip_code" size="10" id="txtbox1" style="display: none;">
<select style="width: 90px;" name="choose_zip_code" id="list1" onChange="zipcode(this.form.choose_zip_code.value);return true;">
<option value="60601">60601</option>
<option value="77777">77777</option>
<option value="NEW">NEW</option>
</select>
</form>
</body>
</html>