I am trying to implement numeric paging for my html table where I need to populate records using javascript in a aspx page. I am using PageMethods for calling server side code and manipulating the data returned from page methods using javascript / JSON(for parsing). By thsi way, I populate data in a html table using data returned from PageMethods using JSON and javascript. I am having the following javascript code for pagination in table as below:
The code where we initialize the page number below is where we call the code for implementing the paging for html table. Number of records for every page is 5. The method showPageNav is to create the numeric links in pageNavposition div tag using javascript above.
The variable pagerHtml holds the dynamically generated links within the div when showPageNav method is called.
The problem is when I click the numeric links generated in the div below the table in the final aspx page, I get a JScript runtime error that 'pager' object is undefined. Any help is welcome here.
2) My second problem when I use setAttribute to create attribute for input tag, the final outerHTML generates attributes without double quotes. However, I tried to set, it does not work and I cannot execute onclick function which I generated dynamically using the setAttribute tag.
Any help is welcome.
-Araind.
# | field |
---|---|
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 |
The code where we initialize the page number below is where we call the code for implementing the paging for html table. Number of records for every page is 5. The method showPageNav is to create the numeric links in pageNavposition div tag using javascript above.
The variable pagerHtml holds the dynamically generated links within the div when showPageNav method is called.
The problem is when I click the numeric links generated in the div below the table in the final aspx page, I get a JScript runtime error that 'pager' object is undefined. Any help is welcome here.
2) My second problem when I use setAttribute to create attribute for input tag, the final outerHTML generates attributes without double quotes. However, I tried to set, it does not work and I cannot execute onclick function which I generated dynamically using the setAttribute tag.
Any help is welcome.
-Araind.
No comments:
Post a Comment