Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Foo = function(){
- this.stage = 0;
- };
- Foo.prototype.bar(){
- $.ajax({
- url: url,
- data: {'stages': this.stage},
- type: 'GET',
- dataType: 'html',
- contentType: 'application/json',
- success: function(data) {
- //use data
- },
- error: function(xhr, testStatus, error) {
- console.log("Error occured: "+error+" "+xhr+" "+testStatus);
- }
- });
- this.stage++; //doesn't work
- console.log(this.stage); //this works
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement