Advertisement
Guest User

Untitled

a guest
Jul 7th, 2015
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. var serviceURL = "http://projeto.websites.net/Verifica/Atualiza";
  2. var parametros = { id: protocolo }
  3. $.ajax({
  4. type: "GET", url: serviceURL, data: parametros, async: false,
  5. complete: function (data) {
  6. console.log(data);
  7. if (data.prazo != meuprazo || data.status != meustatusBD || data.id_Departamento != meunomeDepartamento) {
  8. db.transaction(select, errorCB, null);
  9. function select(tx) {
  10. tx.executeSql('UPDATE ouvidoria11 set prazo = "' + data.prazo + '", status = "' + data.status + '", nomeDepartamento = "' + data.id_Departamento + '" WHERE protocolo="' + protocolo + '"');
  11. }
  12. function errorCB() {
  13. alert("ERROCB");
  14. }
  15.  
  16. }
  17. }
  18. });
  19.  
  20. Object {readyState: 4, getResponseHeader: function, getAllResponseHeaders:
  21. function, setRequestHeader: function, overrideMimeType: function…}
  22. abort: function ( statusText ) {
  23. always: function () {
  24. complete: function () {
  25. done: function () {
  26. error: function () {
  27. fail: function () {
  28. getAllResponseHeaders: function () {
  29. getResponseHeader: function ( key ) {
  30. overrideMimeType: function ( type ) {
  31. pipe: function ( /* fnDone, fnFail, fnProgress */ ) {
  32. progress: function () {
  33. promise: function ( obj ) {
  34. readyState: 4
  35. responseJSON: Array[1]
  36. 0: Object
  37. anexo: null
  38. assunto: null
  39. endereco: null
  40. id: 0
  41. id_departamento: 2
  42. mensagem: null
  43. nomeDepartamento: null
  44. prazo: "Indefinido"
  45. status: "Aguardando"
  46. __proto__: Object
  47. length: 1
  48. __proto__: Array[0]
  49. responseText: "[{"id":0,"assunto":null,"mensagem":null,"endereco":null,"anexo":null,"status":"Aguardando","prazo":"Indefinido","nomeDepartamento":null,"id_departamento":2}]"
  50. setRequestHeader: function ( name, value ) {
  51. state: function () {
  52. status: 200
  53. statusCode: function ( map ) {
  54. statusText: "OK"
  55. success: function () {
  56. then: function ( /* fnDone, fnFail, fnProgress */ ) {
  57. __proto__: Object
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement