Multiple Pages with a form

Results 1 to 2 of 2

Thread: Multiple Pages with a form

  1. #1
    Shawn Kubik Guest

    Default Multiple Pages with a form

    I&#039;m writing a page that displays the results from a recordset, but also contains a form on it so a new search, or a subsearch can be performed. However, I need to be able to have multiple pages of results and allow the user to select any one of those pages.<BR><BR>The way I have my code written now is to read the contents of the search form (using Request.Form), and the page passed using Request.QueryString. I don&#039;t want the form to retrieve new data every time from the form, and subsequently produce a new recordset, when the page number is merely being changed. Any ideas as to how this could be done?<BR><BR>Also, just so you know, when I DO produce a recordset, I&#039;m putting it into an array and passing the array between the multiple pages using a Session variable.<BR><BR>Thanks,<BR><BR>- Shawn Kubik.

  2. #2
    Join Date
    Dec 1969

    Default RE: Multiple Pages with a form

    Sounds easy enough to me:<BR><BR>First of all, don&#039;t bother with the Request.QueryString stuff. Pass *EVERYTHING* in the form. Even when all the user is asking for is to display another page of the existing RS.<BR><BR>Now, you check to see if they filled in any/enough of the fields in the form that you think/know that they want a new search. If they do, ignore the page number request. If not, use the page number to move to another (or even the same???) page.<BR><BR>If you are currently using hyperlinks to move from page to page, modify them slightly so that, instead, they fill in info (hidden fields) in the form.<BR><BR>Thus:<BR><BR>&#060;A HREF="javascript:document.theForm.pageTo.value=&#0 39;+1&#039;;document.theForm.submit();"&#062;NEXT PAGE&#060;/A&#062;<BR>&#060;A HREF="javascript:document.theForm.pageTo.value=&#0 39;-1&#039;;document.theForm.submit();"&#062;PRIOR PAGE&#060;/A&#062;<BR>...<BR>&#060;FORM Name="theForm" Method=Post ...&#062;<BR>...<BR>&#060;INPUT Type="Hidden" Name="pageTo"&#062;<BR>...<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts