
This code works in FF and chrome. In IE 8 or 9 I get a 500 error saying a not
As this function is working fine in FF, there is only one possibility that the variables you are passing here are undefined just for IE.
Check each variables values in IE console.
Hint: IE is strict about types and everything.
For example:
parseInt(Number);
FF and Chrome assumes it as decimal value whereas IE assumes it as octal number.
So, giving parseInt(Number,10) is recommended.
And even regarding dates, if you provide
var currentDate = new Date("March 18, 2013 11:13:00")
Works good in Chrome and FF, but shows undefined or invalid Date in IE.
You can find more about the recommended notation of the date here
So, in the above examples I am just trying to say you that you may have forgotten to declare type, or correct notation.
Though, this is not the answer you were looking for, I hope this information will help you.
Update: As the error is 500 error, then the problem could be more possibly in rootPath variable's value.