opensim-development – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 eva 1 var updater = Class.create({
2 initialize: function(divToUpdate, interval, file) {
3 this.divToUpdate = divToUpdate;
4 this.interval = interval;
5 this.file = file;
6 new PeriodicalExecuter(this.getUpdate.bind(this), this.interval);
7 },
8  
9 getUpdate: function() {
10 var oOptions = {
11 method: "POST",
12 parameters: "intervalPeriod="+this.interval,
13 asynchronous: true,
14 onComplete: function (oXHR, Json) {
15 $(this.divToUpdate).innerHTML = oXHR.responseText;
16 }
17 };
18 var oRequest = new Ajax.Updater(this.divToUpdate, this.file, oOptions);
19 }
20 });