|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
||||
|
||||
|
dynamic select/option error
ok here is the code i have. what i'm trying to do is dynamically create selects.
Code:
<form name="good" action="?this=<%=countok%>" method="post">
<%for x = 1 to countok%>
<select name="foo<%=x%>" onchange="document.good.submit()">
<option> </option>
<option value="1"<%if request.form("foo"&x) = 1 then%> selected<%end if%>>1</option>
<option value="2"<%if request.form("foo"&x) = 2 then%> selected<%end if%>>2</option>
<option value="3"<%if request.form("foo"&x) = 3 then%> selected<%end if%>>3</option>
</select>
<%next%>
</form>
all three show up but when i do my onchange and select a different one, it gives me the following error Microsoft VBScript runtime error '800a000d' Type mismatch: '[string: ""]' multi.asp line 15 any ideas?
__________________
My brain cells are like a storm trooper's armor: useless |
|
#2
|
|||
|
|||
|
What's line 15 ?
|
|
#3
|
||||
|
||||
|
i got it figured out, i have to assign a value to the first option even if there is no text
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > dynamic select/option error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|