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.


In reply to HTML refresh from CGI by awkmonk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.