23 Feb

livecalendar 1.5.4

In a wave of activity, I’ve upgraded Jon Abad’s LiveCalendar to support KHTML-basesd browsers. This means Konqueror, Safari, and probably Galeon. I’ve only tested it in Konqueror, so you apple-philes can test it for yourselves.

There were two reasons why the code didn’t work in KHTML.

  1. A possible bug in KHTML where insertRow no longer works on tables that have had captions appended to them. The script now doesn’t display the caption in KHTML (couldn’t be bothered working up a longer fix). Maybe I’ll work some more on this one, once KHTML is fixed.
  2. Another bug, which I haven’t bothered reporting yet – when you are sending the XMLHTTPRequest (using the send() method), KHTML does not allow the use of a NULL value as the first parameter. So, the fix in this case was to just not put a parameter in.

Anyway… here it is.

3 thoughts on “livecalendar 1.5.4

  1. I’m brand new to xmlhttprequest, so I’m using yours/Jon’s live calendar to learn a bit more.

    I’m just curious how the script replaces the original calendar. It looks like the calendar is generated by the template and then “covered” by the livecalendar, but I’m not sure if that’s what it’s doing.

    Also, do you have any idea why the script avoids using wp’s standard stylesheet?


  2. The script builds a completely new calendar, then replaces the original calendar with the new one. The reason it requires that the original calendar be there, is so that non-javascript/xmlhttprequest browsers have that original to fall back on if the new one fails.

    It does this by creating a wrapping element around the original calendar, then removing all contents of that wrapper. The wrapper then becomes the containing element of the new calendar.

    The script does not use the default stylesheet because …because… because I never thought to replicate the original 🙂 You could easily adapt the script to use the same IDs and classes as the default. I guess I did it to avoid confusion about what was new and what was old.

Comments are closed.

%d bloggers like this: