Advertisement
cyntthiah

Untitled

Aug 14th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. function VerSaldo2() {
  2. var bip = document.getElementById('NumeroTarjeta').value;
  3. fetch('http://bip-servicio.herokuapp.com/api/v1/solicitudes.json?bip=' + bip)
  4. .then(function (response) {
  5. return response.text();
  6. })
  7. .then(function (data) {
  8. var datos = JSON.parse(data);
  9. console.log(datos.saldoTarjeta);
  10. document.getElementById('Saldo').innerHTML = datos.saldoTarjeta;
  11. })
  12. .catch(function (err) {
  13. console.error(err);
  14. });
  15.  
  16. firebase.database().ref("visitas")
  17. .once("value")
  18. .then((visitas) => {
  19. console.log("visitas >" + JSON.stringify(visitas))
  20. })
  21. .catch((error) => {
  22. console.log("Database error >" + error);
  23. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement