View Full Version : forms

12-09-2003, 03:24 PM
any one see why this is not working
Im trying to get the month name from the calendar function but cant seem to pull the data from the form value "Condate"

<td width="23%"><input name="Condate" type="text" class="txtbox3" id="Condate" onClick='showCalendar(this, this, "dd/mm/yy","en",1)' value="<%=getdate3%>" size="15" readonly>
x = request.form("Condate")
monthnum = MonthName(Month(x))

<input name="WMonth" type="hidden" value="<%=monthnum %>"> </td>
<td width="19%"><div align="center">Name / Promotion</div></td>
<td width="44%"><input name="name" type="text" id="name"></td>

12-09-2003, 03:35 PM
x = request.form("Condate")
monthnum = MonthName(Month(x))

is only going to pull information when the page loads.......

Is that is what is happening?

12-09-2003, 03:36 PM
At first glance, I'd think it's your inconsistent use of quotes. Why not use them right?:

onclick="doSomething('stuff here')"

Not sure why you're using "this" twice as parameters either. Can you show the function you're calling?

P.S. What alien said too...

Roy Sinclair
12-09-2003, 04:06 PM
This looks like another possible case of expecting SERVER SIDE code to interact with the user and the CLIENT SIDE code.

For the record, your ASP code will for all intents and purposes be completely executed before the end user at the client machine even sees the web page. You therefore cannot declare a form field and then further down the page expect to be able to use the value the user entered in that field to make a decision about what else to display.

12-09-2003, 10:25 PM
the Condate input text field works ok and pops up a nice calendar that allows me to select dates, it returns date in this format 03/12/03 I need to grab that date and get the month as a digit and convert it to a name and pop it in a hidden field before I submit the form

12-10-2003, 02:28 AM
So Roy is right in his assumption.

You must put the code (that sets the value of hidden) in the popup calendar when a date is selected.

12-10-2003, 02:45 PM
Or you could just use a javascript function to do it so you do not have to worry about reposting data back to the server.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum