Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
JavaScript Form Help
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Warren Michelsen  
View profile  
 More options Jul 10 2010, 2:26 pm
From: Warren Michelsen <wmichel...@mac.com>
Date: Sat, 10 Jul 2010 11:26:01 -0700
Local: Sat, Jul 10 2010 2:26 pm
Subject: JavaScript Form Help
I have a JavaScript that I use with a web form to ensure that users cannot enter non-existent dates into a reservations site, dates like February 30, June 31, etc.

The JS builds the Day selector with the appropriate number of days based on the value of the month selector.

What I'd like to do it modify the value of the Day selected, if the value selected is less than 10, to add a "0" prefix such that the submitted value will always be two digits, even for days before the 10th of a month.

I have a test page at <http://tours.powellmuseum.org/DateSelectTest.html> so you can see the code I use.

It would seem that I can either change the build() function to prefix a zero onto values less than 10 or I can, perhaps, use an onChange function to adjust the Day value after a selection is made. I've tried the latter, unsuccessfully, and the former is probably beyond my understanding and ability where JS is concerned.

All help will be appreciated.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scout  
View profile  
 More options Aug 7 2010, 10:44 pm
From: Scout <summitsc...@gmail.com>
Date: Sat, 7 Aug 2010 19:44:49 -0700 (PDT)
Local: Sat, Aug 7 2010 10:44 pm
Subject: Re: JavaScript Form Help
Do you want to do that work in javascript, php or mysql?

On Jul 10, 11:26 am, Warren Michelsen <wmichel...@mac.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mickey  
View profile  
 More options Aug 8 2010, 2:07 pm
From: Mickey <Mic...@MDCCLXXVI.com>
Date: Sun, 8 Aug 2010 11:07:48 -0700
Local: Sun, Aug 8 2010 2:07 pm
Subject: Re: JavaScript Form Help
At 7:44 PM -0700 8/7/10, Scout sent email regarding Re: JavaScript Form Help:

>Do you want to do that work in javascript, php or mysql?

I fixed it in php. All better now.

--
Why stand we here idle? What is it that Gentlemen wish? What would
they have? Is life so dear, or peace so sweet, as to be purchased at
the price of chains and slavery! Forbid it, Almighty God! I know not
what course others may take; but as for me, give me liberty or give
me death! -- Patrick Henry, March 1775

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »