awkmonk has asked for the wisdom of the Perl Monks concerning the following question:
I hope this is a nice easy one for my esteemed fellow monks.
A have a CGI script that uses frames and has a refresh button on one frame, and a timed refresh on the other frame. The plan is to have the first frame refresh the second (hide complete records, that sort of thing) as the second shows an on-going status.
My problem is that once I hit the refresh button on the first screen, I'm presented with one of Mr Gates's helpful windows informing me that to refresh the screen I must resend the data. This then pops up every 5 seconds thereafter.
I know that the parameter is being passed again, I just don't seem to be able to clear it/not send it. I've tried setting it to null but I can't modify an l-value, so how do I get rid of it?
env is MS Win2K, Perl 5.8 and Apache.
#!c:\perl\bin\perl -w BEGIN { $|=1; use CGI::Carp('fatalsToBrowser'); } use strict; use CGI qw(:standard); my $script = "sample.pl"; my $cgi = new CGI; my $path_info = $cgi -> path_info; my $status = $cgi -> param("status"); print $cgi->header(); set_frame() if ! $path_info; top_frame() if $path_info =~ /Top/; bottom_frame() if $path_info =~ /Bottom/; sub set_frame { print frameset( {-rows => "33%,66%"}, frame({-name => "Top", -src => $script . "/Top"}), frame({-name => "Bottom", -src => $script . "/Bottom"}) ); } sub top_frame { print $cgi->start_html(); print $cgi->startform(-action=>"$script/Bottom",-TARGET=>"Bottom"); print '<b>Top Frame Text</b>'; print ' <input type="submit" value="Refresh" name="B_Refresh" '; print 'target="Bottom" >'; print '</form>'; print $cgi->end_html(); } sub bottom_frame { print $cgi->start_html(-head=>meta({-http_equiv => 'Refresh', -content => '5'})); print '<b>Bottom Frame Text</b>'; print $cgi->end_html(); }
P.S. I promise to buy myself a nice thick O'Reilly book on Perl & HTML, when I can afford it - roll on pay day.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HTML refresh from CGI
by benn (Vicar) on Mar 25, 2003 at 14:11 UTC | |
|
Re: HTML refresh from CGI
by cfreak (Chaplain) on Mar 25, 2003 at 14:19 UTC | |
by awkmonk (Monk) on Mar 28, 2003 at 10:56 UTC |