Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mostrar: function () {
- this.loader = true;
- // console.log(" #2 MOSTRAR");
- //conteoInut = parseInt($("#conteo").val());
- $.ajax({
- contentType: 'application/json; charset=utf-8"',
- dataType: 'json',
- cache: false,
- type: 'POST',
- url: ('Ajax.asp?rad=' + parseInt(this.radio1) + '&offsetq=' + app.limit),
- data: 1,
- success: function (e) {
- console.log(" SUCCES AJAX");
- if (app.radio1 == "0") {
- app.programas = e.programas;
- app.limit = 0;
- app.arrayClean = false;
- }
- if (app.radio1 == "1") {
- //app.programas = app.programas;
- console.log(" RADIO = 1");
- // $('#tema').remove();
- $("#conteo").val(e.conteo);
- app.limit = e.conteo;
- $.each(e.programas, function (k, v) {
- let programas2 =
- {
- id: v['id'],
- nombre: v['nombre']
- }
- app.programas.push(programas2);
- });
- app.mostrar();
- }
- app.loader = false;
- },
- failure: function (e) {
- console.log(e);
- console.log(" error AJAX");
- app.loader = false;
- }
- }).done( function() {
- // alert( 'Success!!' );
- }).fail( function (jqXHR, textStatus, errorThrown) {
- console.log(textStatus, errorThrown);
- })
- <% dim jsonStr
- dim continuarFlag 'va a ser la flag para saber si seguir o nel '
- continuarFlag = 0
- jsonStr = "{""employees"":[{""firstName"":""John"", ""lastName"":""Doe""},{""firstName"":""Anna"", ""lastName"":""Smith""},{""firstName"":""Peter"",""lastName"":""Jones""}]}"
- jsonCriston ="{""programas"":["
- %>
- <% While ((Repeat1__numRows <> 0) AND (NOT SpReporteNovedadesGenerales.EOF))
- Aux = Aux + 1
- nombrePrograma= ""& cstr(SpReporteNovedadesGenerales.Fields.Item("te_Nombre").Value )
- if (NumFilas <> aux) then
- jsonCriston = jsonCriston+"{""id"":"""&SpReporteNovedadesGenerales.Fields.Item("te_IdTema").Value & """, ""nombre"":"""& nombrePrograma & """},"
- else
- jsonCriston = jsonCriston+"{""id"":"""&SpReporteNovedadesGenerales.Fields.Item("te_IdTema").Value & """, ""nombre"":"""& nombrePrograma & """}]"
- end if
- Repeat1__index=Repeat1__index+1
- Repeat1__numRows=Repeat1__numRows-1
- SpReporteNovedadesGenerales.MoveNext()
- continuarFlag = 1
- Wend
- 'jsonCriston =jsonCriston+ "{""id"":""1"", ""nombre"":""Doe""}]}"
- jsonCriston =jsonCriston +",""conteo"":"""&(cdbl(request.QueryString("offsetq"))+Aux)&""", ""continuar"":"""&continuarFlag&"""}"
- Response.write(jsonCriston)
- %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement