Skip to content

Commit

Permalink
loader.js now uses jquery ajax function
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Mullen authored and Patrick Mullen committed Sep 6, 2009
1 parent bb59da7 commit 13eb623
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions src/test/loader.js
Expand Up @@ -39,8 +39,27 @@ function Animator(termEl, reqUrl){
//this.a.row_buf=false;
//this.a.scr_poweron();

$.ajax({
url: reqUrl,
type: 'GET',

timeout: 1000,
/*
dataType: 'xml',
error: function(){
alert('Error loading XML document');
},
*/
success: function(resp){
// do something with xml
}
});

}

Animator.prototype = {
restOfInit : function( resp ) {
/*
this.doAnimate=false;
if (window.XMLHttpRequest)
this.req = new XMLHttpRequest();
Expand All @@ -49,12 +68,12 @@ function Animator(termEl, reqUrl){
this.req.open("GET",reqUrl, false);
this.req.send(null);

this.resp=this.req.responseText;
*/
this.resp=this.resp;

this.setupTiming2();
this.player_speed=1;

var text = this.resp;

//var bpf = Math.ceil(bps * mspf / 8000);
Expand Down Expand Up @@ -117,9 +136,9 @@ function Animator(termEl, reqUrl){



}
},


Animator.prototype = {
output_line : function (str){
if(this.is_outputting){
//console.log("outputting while already outputting");
Expand Down

0 comments on commit 13eb623

Please sign in to comment.