Forums
This topic is locked
Day / Month / Year lists to single date field?
Posted 08 Mar 2007 12:55:27
1
has voted
08 Mar 2007 12:55:27 Chris Marin posted:
Hi there,I have set up a screen in ASP / Dreamweaver that needs to capture start date and end date and add it to an Access database. I originally had a text field with a java calendar to the right that let you pick a date and auto-fill the relevant text box on click. This worked fine, but inserted the date in US format.
The client hated this.
So to get around this I thought I would have 3 drop-down lists - EndDay, EndMonth, EndYear.
I have a hidden field entitled FinishDate. On submit I have the following code (on line 45):
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>request("form1".item("FinishDate" =request("EndMonth" & "/" & request("EndDay" & "/" & request("EndYear"<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
When I hit submit on the created page I get the following error:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Request object error 'ASP 0103 : 80004005'
Expecting numeric input
/cpd/ongoingactivitysingle.asp, line 45
The function expects a number as input.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Why is it expecting a number?
Replies
Replied 09 Mar 2007 12:27:15
09 Mar 2007 12:27:15 MARK COKER replied:
Hi Chris
Why not try something like this
<input name="FinishDate" type="text" id="FinishDate" value="<%=request.form("EndMonth"%>&<%response.write("/"%>&<%=request.form("EndDay"%>&<%response.write("/"%>&<%=request.form("EndYear"%>" />
Why not try something like this
<input name="FinishDate" type="text" id="FinishDate" value="<%=request.form("EndMonth"%>&<%response.write("/"%>&<%=request.form("EndDay"%>&<%response.write("/"%>&<%=request.form("EndYear"%>" />