Wrox Programmer Forums
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 3rd, 2005, 10:18 AM
Friend of Wrox
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default date()-111 or something

<tr bordercolor="#ECECEC" bgcolor="#ECECEC">
  <td align="center">
<select name="book_date" id="book_date" onchange="form.submit()">
<option value="Please Select">Please Select</option>
<option value="<%=date()%>">Today</option>
<option value="<%=date()-1%>">Yesterday</option>
<option value="<%=date()-2%>">2 Days ago</option>
<option value="<%=date()-3%>">3 Days ago</option>
<option value="<%=date()-4%>">4 Days ago</option>
<option value="<%=date()-5%>">5 Days ago</option>
<option value="<%=date()-6%>">6 Days ago</option>
<option value="<%=date()-7%>">7 Days ago</option>
<option value="<%=date()-14%>">2 Weeks ago</option>
<option value="<%=date()-21%>">3 Weeks ago</option>
<option value="<%=date()-31%>">1 Month ago</option>
<option value="<%=date()-62%>">2 Months ago</option>
<option value="<%=date()-93%>">3 Months ago</option>
<option value="<%=date()-124%>">4 Months ago</option>
<option value="<%=date()-155%>">5 Months ago</option>
<option value="<%=date()-186%>">6 Months ago</option>

My drop down menu above takes the value over to the next page.

What I would like it to have another textbox that i could manually ENTER the date and pass that to the next page.

How can this be done without already knowing the date()-111 for example.

My textbox:
<input type="text" name="date" size="20">

Ayrshire Minis - a Mini E-Community
Old February 3rd, 2005, 01:51 PM
Friend of Wrox
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts

I think u should remove onchange="form.submit() from select:

<select name="book_date" id="book_date" onchange="form.submit()">

I am not clear when u say

How can this be done without already knowing the date()-111 for example.

Om Prakash

Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginning ASP.NET 2.0 Chapter 4 page 111 gvecino BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 7 December 2nd, 2006 01:36 PM
Ch04 TIO Pg 111 Error lollivier BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 4 February 14th, 2006 11:31 AM
Listbox with multiple vlaues on item ( AAA , 111) mail4nrs Classic ASP Basics 1 December 7th, 2004 06:04 PM
DTS Import ( Date string to Date field) gfowajuh SQL Server 2000 1 September 30th, 2003 06:28 AM
Convert String Date to Date for a SQL Query tdaustin Classic ASP Basics 4 July 7th, 2003 06:01 PM

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