Board Logo

Suggested Fix for JS error on pages not containing a calendar with js in header
Manlaan - 6/16/2009 at 08:53 AM

If one uses a template page with the calendar.js in the header, the pages that do not include an actual calendar tosses up a bunch of javascript errors while using the mouse wheel (and I'm sure other things).

The error is "window.A_TCALSIDX is undefined". In calendar_us.js, it is on line 307 in the f_tcalHideAll function.

One fix is to add
if(typeof window.A_TCALSIDX != "undefined")
right before the for loop to verify the variable is defined.

I know I'm being lazy to just add it to the global header, but its in an internal application and is used more often than not.

Back to forum: