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

Using Calendar widget with Cold fusion

Expand Messages
  • Susan (Swartz) Hansen
    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
    Message 1 of 2 , Dec 4, 2006
    • 0 Attachment
      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.
      Appreciate very much any guidance you can offer. There are 8 possible
      maps they could see, one for each day, depending on which week.
      (Example: on thurs, week 3 they are at map 8) (Yes, I know the map
      would display if I registered with google - I'm too lazy to register
      another location when we'll be switching back to our regular site when
      this goes live)

      THANK you for any suggestions.

      http://www.rochesterpubliclibrary.org:8080/bookmobile/stops.html
    • 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 2 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.