Created
April 14, 2010 12:45
-
-
Save aguimaraes/365771 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function(){ | |
| getMessages(); | |
| setInterval('getMessages()', 500); | |
| }); | |
| function getMessages() { | |
| $.ajax({ | |
| type: 'GET', | |
| url: urlbase + 'data/finished/' + call_id, | |
| dataType: 'json', | |
| success: function(data, textStatus, XMLHttpRequest) { | |
| console.log(data); | |
| console.log('success'); | |
| }, | |
| complete: function(textStatus, XMLHttpRequest) { | |
| console.log(textStatus); | |
| console.log('complete'); | |
| }, | |
| error: function(XMLHttpRequest, textStatus, errorThrown) { | |
| console.log(textStatus); | |
| console.log('error'); | |
| } | |
| }); | |
| var content = ''; | |
| $.ajax({ | |
| dataType: 'json', | |
| url: urlbase + 'assist/get/' + call_id, | |
| success: function(data, textStatus, XMLHttpRequest) { | |
| // esse funciona... | |
| } | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment