Loading ...
Sorry, an error occurred while loading the content.
 

How to get the value of the rowsperpage dropdown box?

Expand Messages
  • touch_sid
    I am trying to display: Page 1 of 10 template : ..... + {PreviousPageLink}   Page{PageLinks}of    + pages +  
    Message 1 of 1 , Aug 26, 2008
      I am trying to display: Page 1 of 10
      template : .....
      '<span class="pg-nav">' +
      '{PreviousPageLink}   Page{PageLinks}of   '+ pages +
      '  {NextPageLink}</span>'
      ......

      I am trying to get the page # using the selected value of DropDownBox.
      2 Things: i didnt know how to get the '# of pages', so i created my
      own code to display it but now since the '# of pages' has to be
      dynamic everytime the user changes the DD selection, I am stuck.

      //TODO: get the page number when the user comes back from other page
      var pageNum=1;

      //initial # of display rows.
      var pageRows=5;

      //total # of result rows
      var rowCnt = <% out.println(search.getRowCount().toString()); %> ;

      //total # of pages - to get this from the display rows per page DDbox.
      //TODO: how to get the selected rowsperpage to calculate the # of pages.
      var pages = Math.ceil(rowCnt/pageRows);

      thanks for reading... Appreciate your valuable help!
      Sid
    Your message has been successfully submitted and would be delivered to recipients shortly.