Click here to Skip to main content
15,905,563 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a list of objects returned from asmx page using ajax call...on success function i want to bind this list to a div element with 10 dataobjetcs at a page...
Posted
Updated 14-Apr-15 22:54pm
v2

There are lots of jQuery plug ins that provide paging functionality.
jQuery Pagination Plug ins[^]

A nice grid based plug in, that offers pagination features is DataTables[^]. If you're not constraining yourself to paging div elements, and can use a table, this is worth a look at.

... hope it helps.
 
Share this answer
 
v2
I want to pass response object which i got from ajax call success, as an argument to an onclick function
That question was closed due to abuse reports, but apparently it can be answered.

The question "how to" is incorrect here, here is why: you cannot pass anything to this event handler, because you don't decide what to pass to it. The event is invoked by the browser on user's click; you never call your event handler and cannot decide what to pass to it and what not.

The other answer you got was not only completely wrong, but also impractical: the object passed through outer context, which can be done sometimes, but it not needed (see below) and is a bad coding practice.

However, you can get access to the DOM object clicked. The event object is always passed as the first argument to your event handler.
JavaScript
function myClickHandler(event) {
    var domElement = event.target;
    //...
}
Please see: https://developer.mozilla.org/en-US/docs/Web/API/Event.

This is the way to use the same event handler on more than one DOM element.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900