92 | function backBtn(){ |
93 | var limit = parseInt($("#limithid").text()); |
94 | var offset = parseInt($("#offsethid").text()); |
95 | var rowcount = parseInt($("#rowcounthid").text()); |
96 | var top = (offset + limit); |
97 | |
98 | $("#rightbtn").attr('disabled', false); |
99 | |
100 | if (offset <= 0) { |
101 | offset = 0; |
102 | $("#leftbtn").attr('disabled', true); |
103 | |
104 | } else { |
105 | top = (offset); |
106 | offset = (offset - limit); |
107 | } |
108 | |
109 | $("#rowcount").html(rowcount); |
110 | $("#pageCount").html(offset+"-"+ top +" of "); |
111 | $("#offsethid").text(offset); |
112 | |
113 | |
114 | $.ajax({ |
115 | type: "GET", |
116 | url: "ajax/maillogajax.php", |
117 | data: "limit="+limit+"&offset="+offset, |
118 | dataType: 'HTML', |
119 | beforeSend: function () { |
120 | $('#mailLogOutput').html("<p></p>"); |
121 | }, |
122 | success: function (html) { |
123 | $('#mailLogOutput').html(html).promise().done(function(){ |
124 | $.getScript('js/selector.js'); |
125 | }); |
126 | }, |
127 | |
128 | error: function (textStatus, errorThrown) { |
129 | |
130 | console.log(textStatus); |
131 | console.log(errorThrown); |
132 | } |
133 | }); |
134 | }; |