no i am using pagination for displaying ten records per page and each record has to be given a check box and so i created in the above decribed way…tell me the way to create and retrieve value when the checkbox gets clicked in a better way …someone do help me
i forget to mention athing …i.e checkbox should be checked …any no of check box can be checked and when i click a submit button i need the values of the checkboxes…it will be better if u suggest me a way for retrieving multiple values form the check box…do help me plz
If you need to "remember" a list of checkboxes which are ticked across a collection of pages in a paginated list without using form posts then the following works for me.
It uses the prototypejs library but no doubt it could be modified to use jquery. it works by using cookies to remember which checkboxes are ticked on each page.
Assuming you have a page containing a paginated list add a checkbox to the table with the name 'rememberMe'. Here I want to remember the id of the model entity which is checked so I assign the id of the model as the checkbox id
To retrieve the list of checked ids or reset (uncheck) the list I use the following form element at the bottom of the page containing a hidden field which will contain the list of ids submitted by the form. The exportIDs() function (contained in cookies.js) assigns the ids of the checked boxes to the hidden field.