Now though, I'm working for this company, and a lot of our employees work for other companies as well, and they often don't have any other choice than IE6. So now I need to start minding it.
So far I've only really had to deal with parts of the application that people at our office use, and they all use Chrome there, so I've had an easy ride. Now though I'm entrenched in a part that employees have to use as well and immediately things go wrong.
I was unaware that IE6's JavaScript parser is so picky that it doesn't allow left-over commas in arrays.
So this is ok:
$(".datepicker").datepicker({ showOn: "both", buttonImage: "images/calendar.png", buttonImageOnly: true, changeMonth: true, changeYear: true, yearRange: '1900:+20' });
$(".datepicker").datepicker({ showOn: "both", buttonImage: "images/calendar.png", buttonImageOnly: true, changeMonth: true, changeYear: true, yearRange: '1900:+20', });
It's not really a big deal, but keeping comma's at the end is nicer when working with diffs since it keeps the line from changing, just to add a comma.
Anyway, I was very surprised by this, lesson (hopefully) learned. So... Note to self, don't use that trailing , in JavaScript.
No comments:
Post a Comment