Javascript code 0 error

Posted on 2012-08-28
Last Modified: 2012-08-28
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,

Question by:nguyenhai
    LVL 25

    Accepted Solution

    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:

    Author Comment

    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]));

    Author Closing Comment

    very quick response.
    LVL 25

    Expert Comment

    thanks ... you did change both lines and you did mean this ...
    var dt = new Date(tmp[2],$.inArray(tmp[1], Months), tmp[0]);

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question ( on how to make a page show some balloons animate up a page…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now