Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Va al final del archivo, entre </body> y </html>
- <script>
- $.ajax({
- type: "POST",
- url: "listadoReportes.aspx/cargarListadoReportesAdmin",
- data: "{ reportes:" + 1 + " }",
- dataType: "json",
- async: false,
- cache: false,
- contentType: "application/json; charset=utf-8",
- success: function (datos) {
- //Valido si hubo Error, si es diferente a -1 es que hubo error
- var existeError = datos.d.indexOf('Error');
- if (existeError == -1) {
- listadoReportes = JSON.parse(datos.d);
- var nuevos = 0;
- for (var i = 0; i < listadoReportes.length; i++) {
- nuevos += listadoReportes[i].nuevos;
- }
- if (nuevos > 0) {
- $(".reportesAdmin").append('<span id="reportesNuevos" style="background: #12f1dc;color: white;border-radius: 10px !important;transition: all .3s;padding: 0px 4px;">*</span>')
- }
- } else {
- Error = datos.d;
- if (Error != "") {
- alert(Error);
- return false;
- }
- }
- }
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement