I'm trying to use a plugin for paging from jquery, the thing is that the demo is not very clear, at least for me that I'm not very familiar with jquery and httphandlers. Here is the javascript code.
$(function () {
var a = 10;
var b = 10;
function get_data(l, li) {
$.ajax({
type: "POST",
url: "Handler.ashx",
data: { type: "get" },
sucess: function (html) {
$("#results").html(html);
}
});
}
get_data(1, b);
$.ajax({
type: "POST",
url: "Handler.ashx",
data: { type: "total" },
success: function (total) {
$("paging").jpaging({
all_items_num: total,
callback: get_data,
items_on_page: a,
pages_step: b
});
}
});
});
Then in my handler I'm trying to do this, this is beacause I'm following a tutorial to use a Jquery Plugin for paging, the web page for this plugin is http://jpaging.fahon.org/usage
In the handler it puts this code in the http context function
the "context" is the HttpContext variable.
context.Request.Form["type"]
I thought it was getting the variable "type" from the data in the ajax in the javascript but it does not get me anything, it always gets null.
What am I doing wrong?
Thanks in Advance