<html>
<head>
<%Dim ColorIndex(4),Colors(4),i %>
</head>
<body>
<%ColorIndex(1)="Love":ColorIndex(2)="Jealous":ColorIndex(3)="Peace":ColorIndex(4)=+"Leading"
Colors(1)="red":Colors(2)="yellow":Colors(3)="green":Colors(4)="blue"%>
<form name ="myform">
<select name="mycolors" onchange ="GetIndex()">
<% for i=1 to 4 %>
<option><%= Colors(i)%></option>
<% Next %>
</select>
<script language ="vbscript">
sub getIndex()
dim c
c=myform.mycolors.selectedIndex
msgbox "you selected "& "<%=Colors(c)%>" & " which means " & "<%=colorIndex(c)%>" 'c won't work here
end sub
</script></form>
</body>
</html>
Software/Hardware used:
ASKED:
January 25, 2009 6:33 AM
UPDATED:
January 27, 2009 7:26 PM
What problems are you having ?
Are you getting errors ? what is the error message ?