1

I'm trying to call rrdFlotAsnc in a timeout for realtime updates, I always get an Exception:

0x80004005 ...FetchBinaryURLAsync::....data:no

without calling from a timer, all works fine, so I'm a little confused.

I used the debugger and I'm more confused:

my code:

 if ( typeof (f) == 'undefined' ) {
   var f=new rrdFlotAsync("mygraph2",fname,null,{yaxis:{min:1000,max:1030}},gtype_format,ops);
 } else {
     f= rrdFlotAsync("mygraph2",fname,null,{yaxis:{min:1000,max:1030}},gtype_format,ops);
  }

Every time, the program jumps into both cases???? But why?? Is it a problem of missing parameter ?

and whats the reason for the exception.

All remarks are welcome.

the complete code:

function drawBaro() {

  document.write('<div id="mygraph2"></div>');
  //document.getElementById("infotable").deleteRow(0);

  fname="/Aurora/db/baro.rrd";
  var gtype_format={'druck':{ title: 'druck', label:'Druck', color: "#ff8080"}} 

 var ops={use_checked_DSs: true, checked_DSs: ['druck'], use_rra:true, rra:0, graph_width:"800px", use_windows: false,  graph_only:true}

  // the rrdFlotAsync object creates and handles the graph
  var vorh = 0;
  if ( typeof (f) == 'undefined' ) {
       vorh = 1;
  } else {
    vorh = 2;
  }
  //   var f=new rrdFlotAsync("mygraph2",fname,null,{yaxis:{min:1000,max:1030}},gtype_format,ops);
  if ( vorh == 1) {
     var f=new rrdFlotAsync("mygraph2",fname,null,{yaxis:{min:1000,max:1030}},gtype_format,ops,null, null, ucallb);
  } else {
     f= rrdFlotAsync("mygraph2",fname,null,{yaxis:{min:1000,max:1030}},gtype_format,ops);
  }


   }
     function ucallb () {
        alert ();
     }


     function drawBaroDia () {
        var updateInterval = 20 * 1000;
        $(this).val("" + updateInterval);

        update ();
     }
     function update () {
        var updateInterval = 20 * 1000;

        drawBaro ();
       setTimeout ( update, updateInterval );
     } 
}
rogerdeuce
  • 1,471
  • 6
  • 31
  • 48
jr1
  • 9
  • 2

0 Answers0