Hello,

I'm very new to the concept of writting a CGI. I've programmed in a few other languages and started learning pearl several months ago, however I have never messed with HTML before.

Anyways I am wanting to write a script that will have several menus each with various selections of positive and negitive numbers. The script should perform the math on the numbers and print the total in a box below them. I'm wanting this to be a dynamic document. If the user changes one of the menu options it will submit that new option perform the math and print the new result.

So far I think I've solved and learned most of how to do this. The main problem I'm currently having is I cant figure out how to get the menu to submit its new value without making a submit button. I have seen people do it other ways and I was wondering how to do that with CGI.pm.

The next area I might have fun trying to play with is keeping state in this document. I saw that CGI.pm gives me some ways to do this but I wasnt the most clear on how.

If anyone of the kind folks here can give me some advice on my main problem or on my script in general it would be wonderful.


In reply to CGI Menu submit by Anonymous Monk

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.