0

I'm having an issue with the .bind function, which works in firefox and chrome, but not with IE. The fix mentioned in this topic: How to handle lack of JavaScript Object.bind() method in IE 8 does not work.

I have tried replacing it with the.on function, but doesnt work either in IE. The code will be run on university computers so older IE versions are, unfortunately, to be expected.

Is there another part of this code that is perhaps preventing it from working? (note: I also use the IE fix from jqplot)

$('#chart').on('jqplotClick', function(event, seriesIndex, pointIndex, data) {
var xax = pointIndex.xaxis;
var yax = pointIndex.yaxis;
console.log("Coordinates according to chart location for plot1 : " + xax + " - " + yax);
myDataRef.push("Coordinates according to chart div for plot1 : " + xax + " - " + yax);
if (Math.round(xax) === 9) {
    $('#info1').html("Your sales forecast for time period 9 is " + Math.round(yax) + " units.");
    $('#proceed').show();
    //add new datapoint and renew dataserie s3
    plot1.series[1].data = [[1, 28], [2, 13], [3, 54], [4, 47], [5, 28], [6, 13], [7, 54], [8, 47], [xax, yax]];
    //fill in replot/redraw!
    plot1.drawSeries({},1);

}
//if they click outside of the 9th time period:
else {
   alert("Please click within the correct grid lines (period 9)"); 
}

EDIT: I found a script that helped: http://diogomelo.net/blog/12/javascript-compatibility-internet-explorer

Community
  • 1
  • 1
ShariDB
  • 159
  • 1
  • 11

0 Answers0