Forum Moderators: coopster & phranque

Message Too Old, No Replies

interaction of browser back button and cgi scripts

Does back button pass parms to script just previously called?

         

pilgrim8

11:51 pm on Jul 14, 2005 (gmt 0)



I have written scripts to retrieve records from a db. They start by displaying "first 20" and do the usual "click for next 20 records". It will go forward displaying the next 20 each time it is clicked because cgi passes the parms for the next 20. But when the browser back button is pressed anywhere in the process, it goes haywire. Is there a way to make the parms for the previous batch be passed to the script when the back button is pushed.

Thanks anyone who knows anything about this.

SeanW

6:56 pm on Jul 15, 2005 (gmt 0)

10+ Year Member



I'd imagine you're using a POST... Try a GET.

Sean

WWMike

3:22 am on Jul 18, 2005 (gmt 0)

10+ Year Member



I don't think it's possible to do what you want to do with the browser back button but even if it is, the better solution would be to create your own BACK & NEXT links on the script generated display page and have them supply the starting record number as a parameter to the script. For example, the page with records 21 thru 40 on it would also have the following navigational links:

<A HREF=script.cgi?1>BACK</A> and <A HREF=script.cgi?41>NEXT</A>