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

help ID

Expand Messages
  • r.oddy
    Hi am a newbie in javascript. I am currently building a calendar using a bit of php and ajax. I faced a problem where when i click on a date i can t keep that
    Message 1 of 2 , Mar 21 9:33 AM
    • 0 Attachment
      Hi am a newbie in javascript.
      I am currently building a calendar using a bit of php and ajax. I
      faced a problem where when i click on a date i can't keep that date,
      colored. If i use php to make the code read the variable in the link
      then it work fine but this is useless as i don't want my page to
      refresh but to be more on clientside. So what i was looking for really
      was when a user selects a date is keep the selected date colored.
      Can this be done?
      I've tried putting an id in the cell like this
      <td id="1"> The id is generate for each id as the date itself, i.e
      date 1 will be id 1 date 2 will be id 2 etc.. This is done through php.

      I was thinking to use the date as an id in the cell so as to retrieve
      the id, the next stage would be to keep the id i clicked on colored.
      But i don't know how to make javascript write to html? I hope i
      explained this properly.
      Thx.
      Roddy
    • Satyen Desai
      Hi Roddy, I m not sure I completely follow your question. It doesn t seem like you re talking about the YUI Calendar but rather about building one yourself. If
      Message 2 of 2 , Mar 21 6:30 PM
      • 0 Attachment
        Hi Roddy,

        I'm not sure I completely follow your question.

        It doesn't seem like you're talking about the YUI Calendar but rather
        about building one yourself. If so, have you tried out the YUI
        Calendar? http://developer.yahoo.com/yui/calendar/

        It handles maintaining and coloring selected dates on the client-side
        for you, which sounds like what you're trying to do.

        If I'm completely off base, can you post some of your code? That may
        help us understand what's being done.

        Thanks,
        Satyen
      Your message has been successfully submitted and would be delivered to recipients shortly.