Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 22nd, 2007, 12:26 PM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Radio type Input.

I have a radio input, code like below:

<Form name="test" action="test.asp" method="post">
<td><input type="button" value="1">New</td>
<td><input type="button" value="2" checked>old</td>
<td><select name="StartYear" >
 <% for nm = 1980 to (year(now)-1) %>
 <option value='<%=nm%>'><%=nm%></option>
 <% next %>
 </select>
</td>
</Form>
BUT NOW, I want to base on which button choosed, to set up different pulldown list.: like if <input type="button" value="1">choosed, I am gonna show the pull down list as:
<Form name="test" action="test.asp" method="post">
<td><input type="button" value="1">New</td>
<td><input type="button" value="2" checked>old</td>
<td><select name="StartYear" >
 <% for nm = 1980 to year(now)%>
 <option value='<%=nm%>'><%=nm%></option>
 <% next %>
 </select>
</td>

Is it possible for me to do that? if "yes", how? Thank you very much for any suggestion.




Reply With Quote
  #2 (permalink)  
Old February 22nd, 2007, 12:30 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

First <input type="button" value="2" checked>old generates a button, not a radiobutton so it does not have a CHECKED attribute.

Second, yes it is possible to populate a dropdown based on a radio button decision and you will want to look into javascript to do this. (You could post back to the server to populate the dropdown, but I think javascript is a better route)

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html

Discussion:
http://p2p.wrox.com/topic.asp?TOPIC_ID=56429
Reply With Quote
  #3 (permalink)  
Old February 22nd, 2007, 05:39 PM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for ur answer

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Zxml.js and input radio problem tezro BOOK: Professional Ajax ISBN: 978-0-471-77778-6 3 December 8th, 2007 05:19 PM
input type file darkhalf Javascript 1 October 29th, 2005 02:17 AM
input type="image" tgopal Javascript How-To 1 September 22nd, 2005 05:16 AM
Input type Mantis PHP How-To 9 December 10th, 2004 05:03 AM
<input type="File"> - Specify File Type and Path gp_mk Classic ASP Basics 2 August 2nd, 2004 03:07 AM



All times are GMT -4. The time now is 10:49 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.