If you're already using JavaScript, you can set a variable in the parent window as the child window closes (or on the OnBlur event, when it loses focus). The variable that was set can then be passed to the CGI script with standard CGI techniques.
The other non-JavaScript (and many would say better) way is simply to move to another page to enter that data, and return to the previous page when complete. You can maintain your state variables either be using hidden fields, or using one of the several state packages (or your own in a database, or the web server, or whatever. Just make sure you're not opening yourself to security issues, where someone can hack a variable and do some damage).
There are a number of nodes on the site that talk about the various methods of maintaining state variables in a CGI environment. Type 'super search' in the search box at the top, and try words like 'state maintain', etc. You may have to do a little poking around to get a good hit.
--Chris
e-mail jcwren
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.