Well, my situation was a little different. I had the date already supplied by the user from a form. Then I pass the date in the url, in my case it was submitting to the same page. I do have another application where the user picks a date from a calendar and it passes the date just fine, but it uses beaucoup lines of JavaScript. Date js code is easy to find. Some good JavaScript site: http://www.w3schools.com/js/js_examples.asp http://javascript.internet.com/ Zelda, PS I'm a newbie too.
-----Original Message----- From: a or [mailto:[EMAIL PROTECTED] Sent: Friday, May 16, 2008 9:42 AM To: CF-Newbie Subject: Re: Can CF format a form value on submit ? hmmmm.... not quite sure I understand how I'll do this..... at the moment i'm using the following: <cfinput value="" id="pubDate" name="pubDate" type="text"/><br /> what is the best approach to format as below <cfinput value="" id="pubDate" name="pubDate" type="text" onSubmit="convert(this.value);"/><br and then something like this ? function convert(pDay) { <cfset pDay= #DateFormat(dateString, "ddmmyyyy")#> <cfoutput> #DateFormat(pDay, "ddmmyyyy")# </cfoutput> /> >Try: > ><cfset dateString = "16 May 2008"> ><cfoutput> > #DateFormat(dateString, "ddmmyyyy")# </cfoutput> > >Adrian >http://www.adrianlynch.co.uk/ > >Hi, > >Is it possible to format a form value on submit using only Cold Fusion ? > >I am using a calendar to populate a form field in the following format >16 May 2008. >When I submit the form, I need the URL string to read as >index.cfm?16052008 and NOT index.cfm?16+May+2008 > >Is this possible to do this using ColdFusion only or should I use >Javascript (or a combination of both maybe ?? using DateFormat inside a >javascript function. > >thanks in advance, > >alan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3637 Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
