in reply to Dynamic Page - AutoPOST

If you are wanting to do what i think you are wanting to do, just use a meta tag:
use CGI; # have to send the values via GET for refresh my $script = $CGI->script_name . '?foo=bar&baz=spaz'; my $CGI = new CGI; print $CGI->header(), qq|<head><title>refresh every 8 seconds</title>|, qq|<META HTTP-EQUIV="refresh" content="8;URL=$script"></head>|; # rest of the web page here
Jeff

R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--

Replies are listed 'Best First'.
Re: (jeffa) Re: Dynamic Page - AutoPOST
by dculpSC (Initiate) on Jun 01, 2001 at 22:23 UTC
    Thanks for the quick reply. I'm not sure if this will work. Each time the page is entered, a collection of new values is done. Then other values are calculated based on the "previous page's data". How will the values be passed ? The data is too large to use the standard "query string". David
      Hmmm, if the data is indeed to large to slam into a query string, then you should look into saving the state of the form to a file. Take a look at the save() method in the docs for CGI.pm.

      The gist is to try to open the file and use it to create a new CGI object. After you set the new values, save the state to the file. This will not work if you plan on having different data available to different users, but if everybody is viewing the same results, it shouldn't be a problem.

      Don't forget to use flock on the state file.

      Jeff

      R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
      L-L--L-L--L-L--L-L--L-L--L-L--L-L--
      
        A POST could handle the large dataset. If there was a way to "REDIRECT" after "sleeping for x secs" to the same .CGI sending it the POSTED data. Could LWP Help ?
      Then just pass an identifier, and use it to key into a server side lightweight database, like File::Cache. I show this in my latest columns in Linux Magazine, on creating an on-line quiz. The text of the columns won't be online for a couple more months though, because of the 3-month delay restriction.

      -- Randal L. Schwartz, Perl hacker