Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Current Version (Old)
 Listbox Question
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

e3stone
Average Member

USA
885 Posts

Posted - 30 May 2001 :  06:35:31  Show Profile  Send e3stone an AOL message
on my register page, http://www.insidewaco.com/forum/register.asp?mode=Register , I have listboxes for entering the birthdates of the members, it then checks to see if the person is >= 16 yrs. However, I have the years listed from 1900-2000, but too many people are just selecting 1900 (since its the first choice) and their age is listed as 101 on their member profile. Anyways, I want to have the list start with 2000 and go down to 1900. How do I do that?

Here's the code I have to populate the listbox:
<select name="birthday_year" size="1">
<option value="">Year</option>

<% for yearcount = 1900 to 2000 %>
<option value="<%=yearcount%>" <% if myYear = yearcount then response.write "selected" else response.write "" %>><%=yearcount%></option>

<% next %>
</select>

Thanks

<-- Eric -->


http://insidewaco.com/forum/home.asp

RaiderUK
Average Member

United Kingdom
577 Posts

Posted - 30 May 2001 :  06:50:08  Show Profile  Send RaiderUK a Yahoo! Message
give this a try:

<select name="birthday_year" size="1">
<option value="">Year</option>
<% yearcount = 2000 %>
<% while yearcount > 1900 %>
<option value="<%=yearcount%>" <% if myYear = yearcount then response.write "selected" else response.write "" %>><%=yearcount%></option>
<% yearcount = yearcount - 1 %>
<% wend %>
</select>

Go to Top of Page

e3stone
Average Member

USA
885 Posts

Posted - 30 May 2001 :  07:01:47  Show Profile  Send e3stone an AOL message
Yep, that works!! Thanks a lot

<-- Eric -->


http://insidewaco.com/forum/home.asp
Go to Top of Page

rstuven
Starting Member

Chile
14 Posts

Posted - 08 June 2001 :  05:35:12  Show Profile
for code simplicity:

<% for yearcount = 2000 to 1900 step -1 %>




Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07