Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Using Calendar widget with Cold fusion

Expand Messages
  • Matt Warden
    ... This is not at all a dumb question. Think of the calendar control as an input. How would you handle it if it was just a text box and the user had to enter
    Message 1 of 2 , Dec 4, 2006
    • 0 Attachment
      On 12/4/06, Susan (Swartz) Hansen <shansenhome@...> wrote:
      > Please excuse a dumb question from a librarian trying to be a
      > programmer without much success. Does anyone have an example of using
      > the calendar to select a date from a database that I could look at?
      > I'd like patrons to select a date on the calendar to bring up a google
      > map/route for where our bookmobile is on a given date. I have the
      > dates entered in a database with the URL for the correct map. I have
      > coldfusion but not sure how to make the calendar/coldfusion talk.

      This is not at all a dumb question. Think of the calendar control as
      an input. How would you handle it if it was just a text box and the
      user had to enter the date in MM/DD/YYYY format? This is exactly how
      you can handle this situation, just replacing the text box with the
      calendar control. There are examples in the calendar section of the
      YUI site of how to get the selected date from the calendar control.
      Probably the easiest way to go once you have the date is to simply
      change window.location or open up a new window passing this date to a
      coldfusion script. This cold fusion script would then query the
      database for the URL with this date, and redirect the user to the
      appropriate URL.

      There are a multitude of other options as well, if this does not suit
      your needs. Some will probably suit your needs much better, but will
      not be as simple to code.

      Hope this helps.

      --
      Matt Warden
      Cleveland, OH, USA
      http://mattwarden.com


      This email proudly and graciously contributes to entropy.
    Your message has been successfully submitted and would be delivered to recipients shortly.