Hi,

I am using CGI module.

a.cgi calls b.cgi through POST method. I am collecting all the parameters
using the param function.
b.cgi draws a table based on the input from a.cgi's form. 

The table's row are initially sorted by first column. It is desired that I
can sort the same table by different columns by just clicking on the heading
of the column. 

I read perldoc CGI and found that state of a script could be saved by the
following function.

[...]
    $myself = $query->self_url;
    print q(<a href="$myself">I'm talking to myself.</a>);

self_url() will return a URL, that, when selected, will reinvoke this script
with all its state information intact. This is most useful when you want to
jump around within the document using internal anchors but you don't want to
disrupt the current contents of the form(s). Something like this will do the
trick.

     $myself = $query->self_url;
     print "<a href=\"$myself#table1\">See table 1</a>";
     print "<a href=\"$myself#table2\">See table 2</a>";
     print "<a href=\"$myself#yourself\">See for yourself</a>";
[...]

But I do not want to jump around the page but change the order of the file.

I tried this stupid thing and it did not work.
my $myself = $q->self_url;
print $q->start_form(-method=>'POST',
                     -action=>$myself);

I also read that the parameters can be saved into a file. I tried saving the
parameters and it worked.
But how do I use that information so that I can pass its contents to the
same file.

Kindly help....

PS: Earlier I was using GET method and I had one or two parameters to pass.
So I was able to sort on different columns passing the list explicitly.

--Ankur 

Whatever games are played with us, we must play no games with ourselves. -
Ralph Waldo Emerson



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to