vbguest123
asked on
List box Options
is there any simple way to create
option for listbox or combobox ?
it take much time to write options and its corresponding values
beter if provide any software.
Thanks
option for listbox or combobox ?
it take much time to write options and its corresponding values
beter if provide any software.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<%
dropdown = "a,b,c"
%>
<Select Name="DropDown">
<%
list = Split(dropdown, ",")
For i = 0 to UBound(list)
%>
<option value="<%=list(i)%>"><%=li st(i)%>
<%Next%>
</Select>
try this and see whether it suits you
dropdown = "a,b,c"
%>
<Select Name="DropDown">
<%
list = Split(dropdown, ",")
For i = 0 to UBound(list)
%>
<option value="<%=list(i)%>"><%=li
<%Next%>
</Select>
try this and see whether it suits you
<html>
<head>
<script language="JavaScript">
var b = 0, a, c, sn;
function A()
{
a = prompt("enter the nº of options");
sn = prompt("Enter the select name");
document.all.codi.innerTex
document.all.codi.insertAd
c = window.setInterval("Create
}
function Create()
{
var val, writ;
b++;
if (b > a)
{window.clearInterval(c)
document.all.codi.innerTex
};
else
{val = prompt("Enter the value for " + b + " option:");
writ = prompt("Enter the external words for the " + b + " option:");
document.all.codi.innerTex
document.all.codi.insertAd
};
}
</script>
<body onLoad="A();">
<div id="codi">
</div>
</body>
</html>
That creates the html code of a select tag. Then only copy/paste to the page. You can modify, implement, etc depending of what you need.
jbosch(vosk)