Advertisement
Guest User

page.Master

a guest
Jan 27th, 2020
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. // Va al final del archivo, entre </body> y </html>
  2.  
  3. <script>
  4. $.ajax({
  5. type: "POST",
  6. url: "listadoReportes.aspx/cargarListadoReportesAdmin",
  7. data: "{ reportes:" + 1 + " }",
  8. dataType: "json",
  9. async: false,
  10. cache: false,
  11. contentType: "application/json; charset=utf-8",
  12. success: function (datos) {
  13. //Valido si hubo Error, si es diferente a -1 es que hubo error
  14. var existeError = datos.d.indexOf('Error');
  15. if (existeError == -1) {
  16. listadoReportes = JSON.parse(datos.d);
  17. var nuevos = 0;
  18. for (var i = 0; i < listadoReportes.length; i++) {
  19. nuevos += listadoReportes[i].nuevos;
  20. }
  21. if (nuevos > 0) {
  22. $(".reportesAdmin").append('<span id="reportesNuevos" style="background: #12f1dc;color: white;border-radius: 10px !important;transition: all .3s;padding: 0px 4px;">*</span>')
  23. }
  24. } else {
  25. Error = datos.d;
  26. if (Error != "") {
  27. alert(Error);
  28. return false;
  29. }
  30. }
  31. }
  32. });
  33. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement