ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old August 14th, 2003, 10:36 AM
don_sparko's Avatar
don_sparko don_sparko is offline
Digitally Challenged
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 280 don_sparko User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 14 sec
Reputation Power: 6
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

Reply With Quote
  #2  
Old August 14th, 2003, 10:55 AM
Vlince Vlince is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Canada, Quebec, Montreal
Posts: 410 Vlince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
What's line 15 ?

Reply With Quote
  #3  
Old August 14th, 2003, 11:02 AM
don_sparko's Avatar
don_sparko don_sparko is offline
Digitally Challenged
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 280 don_sparko User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 14 sec
Reputation Power: 6
i got it figured out, i have to assign a value to the first option even if there is no text

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > dynamic select/option error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway