Hi Monks,
Here is a simple example what I do. Inside the loop using scrolling_list()I create a scrol box with text. But I want each new box to replace an old one. I am ok if it requires to start a new page. No AJAX suggestions, please. What I actually need is to renew the box content based on the new array content which I will have from some request (this is not implemented yet). But these are all details. The main question is how to renew the page.
Thanks, Vitaly
use CGI; use strict; my $query = new CGI; for (my $ii = 1; $ii<=2; $ii++) { print $query->header; print $query->start_html('My scrolling_list.cgi program'); my @lang = ( 'Basic ', 'C', 'C++', 'Cobol', 'DHTML', 'Fortran', 'HTML', 'Korn Shell (Unix)', 'Perl Perl Perl Perl Perl P +erl Perl Perl Perl Perl Perl Perl ', 'Java', 'JavaScript', 'Python', 'Tcl/Tk', 'Visual Basic'); print $query->startform; print $query->h3('Select your favorite programming language(s):'); print $query->scrolling_list(-name=>'languages', -values=>\@lang, -size=>8, -multiple=>'true' ); print $query->br; #print $query->submit(-value=>'Submit your favorite language(s)'); print $query->endform; print $query->end_html; }

In reply to Update page inside CGI/Perl sript by vitaly

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.