fork download
  1. $.ajax({
  2. url: "https://url/lojas.php",
  3. type: 'POST',
  4. async: false,
  5. data: {
  6. acesso:'ok'
  7. },
  8. success: function (json) {
  9. if (json.length >= 1){
  10. $.each(json, function() {
  11. let id = this['id'];
  12. let id_cliente = this['id_cliente'];
  13. let id_modelo = this['id_modelo'];
  14. let nomeLoja = this['nomeLoja'];
  15. let periodicidade = this['periodicidade'];
  16.  
  17. db.transaction(function (tx) {
  18. tx.executeSql("INSERT INTO lojas (id, id_cliente, id_modelo, nomeLoja, periodicidade) VALUES (?, ?, ?, ?, ?)", [id, id_cliente, id_modelo, nomeLoja, periodicidade] );
  19. });
  20. });
  21. }
  22.  
  23. },
  24. complete: function (data) {
  25. window.location='painel.html'
  26. }
  27. }
  28. );
Runtime error #stdin #stdout #stderr 0.02s 16800KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
prog.js:1:1 ReferenceError: $ is not defined
Stack:
  @prog.js:1:1