Internet Explorer 8 Issue [FIXED]

Hi,
I’m implementing the dhtmlxScheduler with several extensions, specifically: Recurring Events, Year View, Unit View, Mini Calendar, Multiselect, Editors, and Tooltips

I’ve also added two functions to save and load the current date via AJAX but the only value they ever modify is the date, which to the best of my knowledge is unrelated to this error and only occurs in Internet Explorer.

The error that occurs is this:

'type' is null or not an object

And it occurs on this line in the scheduler._get_lightbox function (NOTE: My actual code uses the minified dhtmlxScheduler.js file, this is the equivalent line from the debug scheduler javascript):

var block=this.form_blocks[sns[i].type];

This error only occurs in Internet Explorer 8, not Firefox or Google Chrome. How can I diagnose and correct this issue? Thanks in advance for your help!

This was another error I was able to figure out on my own, thankfully. It turned out that the structure of my lightbox sections was the problem:

var templates = [{"height":20,"map_to":"text","type":"textarea","focus":true,"name":"title"}, ... {"height":72,"type":"time","map_to":"auto","name":"time"}, ];

This was fine in Firefox and Chrome but gave me problems in IE. But instead of throwing an error when it attempted to parse the JSON as I would have expected it to do, it saved the single space character as another object. Whenever the scheduler attempted to access the type property of said object it then broke.

Yep, this is the differense in JSON parsing between IE and other browsers. While it doesn’t throw parsing errors - behavior will be different and scheduler will fail in IE