Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

IE8 not initializing function properties in javascript.

Posted on 2011-10-05
2
Medium Priority
?
218 Views
Last Modified: 2012-05-12
I have the following javascript. This extends keith woods jquery date picker. In chrome, ff the following alerts a date value. However in ie 8 i get [object, object]

is there something obviously that breaks in ie8 that works in chrome and firefox

<script type="text/javascript"><!--
var defaultDate = '06/01/2011';

$(function() {


    $('#inlineDatepicker').calendarsPicker({onSelect: showDate, defaultDate: defaultDate, selectDefaultDate: true, changeMonth:false, onDate: nationalDays, prevText: '&nbsp;',  nextText: '&nbsp;'});

});


function nationalDays(date, inMonth) { 

    alert(date); // doesn't return date in ie 8
}


function showDate(date) {   
    var start = date.toString('dd-MM-yyyy');
    var url = '/events?s=' + start;
    window.location = url;
}

--></script>

Open in new window

0
Comment
Question by:frosty1
2 Comments
 
LVL 83

Expert Comment

by:leakim971
ID: 36922186
any a link to provide to see it in live?
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 2000 total points
ID: 36922394
Try alert(date.toString())
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…

581 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