From: bruce on
On May 4, 8:23 am, bruce <bruc...(a)bellsouth.net> wrote:
> On May 4, 12:30 am, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:
>
>
>
> > bruce wrote:
> > > On May 3, 5:25 pm, Thomas 'PointedEars' Lahn <PointedE...(a)web.de>
> > > wrote:
> > >> Garrett Smith wrote:
> > >>> Thomas 'PointedEars' Lahn wrote:
> > >>>> Garrett Smith wrote:
> > >>>>> bruce wrote:
> > >>>>>> I have 3 dropdown boxes, Month, Day, Year.
>
> > [snip massive overquote]
>
> > [snip signature]
>
> > > Okay, you have made this into a fantastic discussion, BUT, the
> > > solution as I request, is what I want. My code is for a scheduling
> > > system for the Tennis courts and the Cabana of my Homeowner's
> > > Association consisting of 200 families.
>
> > Not a help desk.
>
> Sorry, I don't understand what you mean by "Not a help desk." I have
> always assumed that these newsgroups were just that, a help desk for
> where highly skilled programmers can assist lesser skilled
> programmers. Or did you mean something else?
>
>
>
> > > My input page has 9 drop down boxes and a submit button. The date drop
> > > down boxes (Month, Day, Year) are preloaded with "Today's" date. The
> > > remaining drop down boxes are Start time and End time boxes are (Hour,
> > > Minutes, AM/PM). Start time is set to the current time. Minutes are
> > > (0, 15,30, 45) only. End time is set to 2 hours after the start time.
> > > These are loaded on the server using PHP.
>
> > Nine select boxes. That's wonderful.
>
> Yes, I think it's a great way to go.
>
> Using these Nine select boxes, it's very easy for the customer to
> select his/her date, start time and end time, then clicking submit. No
> fumbling with the keyboard where typing mistakes can be made. I don't
> have to validate the date format. Did he enter 5/4/10, 5/4/2010, 4 May
> 2010, May 4, 2010, et. al.
>
>
>
> > > My validation is done on the Server using AJAX.
>
> > And when that fails?
>
> When the validation fails, I return an error message, via AJAX.
>
>
>
> > Based on the question you are asking, you should not be attempting any
> > Ajax.
>
> AJAX makes validation much easier.  On the client side, I can check
> for input mistakes, like the End date is before the start date. On the
> server side, I have to check is someone else has already reserved this
> time.
>
>
>
> > The technical solution to what you are asking is not all that hard.
>
> Okay. Can you point to me where there is an example of what I want..
>
> > --
> > Garrett
> > comp.lang.javascript FAQ:http://jibbering.com/faq/
>
>

You are correct. The technical solution is simple. I have it working
with basically 4 lines of code.

Thanks everyone for the suggestions and help...

Bruce
From: Jukka K. Korpela on
bruce wrote:

[ massive fullquote despite all the clues posted... ]

> You are correct. The technical solution is simple. I have it working
> with basically 4 lines of code.

For some odd values of "working", I gather from the URL. (That is, its
absence.)

I bet your code does not even address one of the technical issues I
mentioned: the number of days in February depends on the year, and your
scenario (to the small amount it was revealed) postulates that the year is
selected _after_ selecting month and day.

But I do accept the idea that you can make almost everything work in 4 lines
of code in JavaScript. You might just need extraordinarily long lines at
times.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

From: bruce on
On May 4, 8:23 am, bruce <bruc...(a)bellsouth.net> wrote:
> On May 4, 12:30 am, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:
>
>
>
> > bruce wrote:
> > > On May 3, 5:25 pm, Thomas 'PointedEars' Lahn <PointedE...(a)web.de>
> > > wrote:
> > >> Garrett Smith wrote:
> > >>> Thomas 'PointedEars' Lahn wrote:
> > >>>> Garrett Smith wrote:
> > >>>>> bruce wrote:
> > >>>>>> I have 3 dropdown boxes, Month, Day, Year.
>
> > [snip massive overquote]
>
> > [snip signature]
>
> > > Okay, you have made this into a fantastic discussion, BUT, the
> > > solution as I request, is what I want. My code is for a scheduling
> > > system for the Tennis courts and the Cabana of my Homeowner's
> > > Association consisting of 200 families.
>
> > Not a help desk.
>
> Sorry, I don't understand what you mean by "Not a help desk." I have
> always assumed that these newsgroups were just that, a help desk for
> where highly skilled programmers can assist lesser skilled
> programmers. Or did you mean something else?
>
>
>
> > > My input page has 9 drop down boxes and a submit button. The date drop
> > > down boxes (Month, Day, Year) are preloaded with "Today's" date. The
> > > remaining drop down boxes are Start time and End time boxes are (Hour,
> > > Minutes, AM/PM). Start time is set to the current time. Minutes are
> > > (0, 15,30, 45) only. End time is set to 2 hours after the start time.
> > > These are loaded on the server using PHP.
>
> > Nine select boxes. That's wonderful.
>
> Yes, I think it's a great way to go.
>
> Using these Nine select boxes, it's very easy for the customer to
> select his/her date, start time and end time, then clicking submit. No
> fumbling with the keyboard where typing mistakes can be made. I don't
> have to validate the date format. Did he enter 5/4/10, 5/4/2010, 4 May
> 2010, May 4, 2010, et. al.
>
>
>
> > > My validation is done on the Server using AJAX.
>
> > And when that fails?
>
> When the validation fails, I return an error message, via AJAX.
>
>
>
> > Based on the question you are asking, you should not be attempting any
> > Ajax.
>
> AJAX makes validation much easier.  On the client side, I can check
> for input mistakes, like the End date is before the start date. On the
> server side, I have to check is someone else has already reserved this
> time.
>
>
>
> > The technical solution to what you are asking is not all that hard.
>
> Okay. Can you point to me where there is an example of what I want..
>
> > --
> > Garrett
> > comp.lang.javascript FAQ:http://jibbering.com/faq/
>
>

I thought I posted this message but I can't find it. So please excuse
my double post if it happens to be out there..

Garrett:

You are correct. The solution to my problem was easy. 4 lines of
code..

Thanks everyone for the help.

Bruce
From: bruce on
On May 4, 1:54 pm, "Jukka K. Korpela" <jkorp...(a)cs.tut.fi> wrote:
> bruce wrote:
>
> [ massive fullquote despite all the clues posted... ]
>
> > You are correct. The technical solution is simple. I have it working
> > with basically 4 lines of code.
>
> For some odd values of "working", I gather from the URL. (That is, its
> absence.)
>
> I bet your code does not even address one of the technical issues I
> mentioned: the number of days in February depends on the year, and your
> scenario (to the small amount it was revealed) postulates that the year is
> selected _after_ selecting month and day.
>
> But I do accept the idea that you can make almost everything work in 4 lines
> of code in JavaScript. You might just need extraordinarily long lines at
> times.
>
> --
> Yucca,http://www.cs.tut.fi/~jkorpela/

I'm sorry I didn't mention the routine to determine how many days in
the month. I also have that routine and it does account for 28/29 days
in February even the case where the 400 year century is not a leap,
not that I really care about in my case... Your are correct on
February if the client selects the NEXT year ddand it happens to be a
leap year. February 29th will not appear in the drop down list.

Also, I did find my earlier post. Sorry folks for the double post.. I
doubt it will happen again.

Bruce
From: Garrett Smith on
Jukka K. Korpela wrote:
> bruce wrote:
>
> [ massive fullquote despite all the clues posted... ]
>
>> You are correct. The technical solution is simple. I have it working
>> with basically 4 lines of code.
>
> For some odd values of "working", I gather from the URL. (That is, its
> absence.)
>
> I bet your code does not even address one of the technical issues I
> mentioned: the number of days in February depends on the year, and your
> scenario (to the small amount it was revealed) postulates that the year
> is selected _after_ selecting month and day.
>
> But I do accept the idea that you can make almost everything work in 4
> lines of code in JavaScript. You might just need extraordinarily long
> lines at times.
>


--
Garrett
comp.lang.javascript FAQ: http://jibbering.com/faq/