Javascript code 0 error

I have a Javascript application that deals with dates and have it working to my liking but I am getting a script error when I test it it with Internet Explorer 8.

Other browsers such as IE9, Chrome, Firefox work fine but for some reason IE8 is being picky.

I need it working on IE8 since most of the people that will be using the application are on Windows XP running IE8.

The error can be view @

Error: Object doesn't support this property or method
Code: 0

I've attached the application. Any help is greatly appreciated.

Thanks so much,

Who is Participating?
I think the problem is related to the use of the "indexOf" method to get the month number in your ChangeDateFormat function.  It was not implemented in IE until V9 I think.
You may be able to use the jQuery equivalent "inArray" since you already are using jQuery.  Refer to:
nguyenhaiAuthor Commented:
Hey I believe that did it. Thanks so much. I changed it to

var dt = new Date(tmp[2],$.inArray(tmp[1], Months, tmp[0]));
nguyenhaiAuthor Commented:
very quick response.
thanks ... you did change both lines and you did mean this ...
var dt = new Date(tmp[2],$.inArray(tmp[1], Months), tmp[0]);
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.