in reply to perl + cgi - onclick generation problem
How can I keep track of the set of text area fields already generated?
You could store the number of sets you already have on a certain page in a hidden field, and then always generate one more (n+1) ...
You only need Javascript to do this if you want to avoid the round trip to the server for every addition of a new set of text fields.
if ( $ENV{'QUERY_STRING'} =~ /^Button_name/ ) {
It's most likely easier to use a module such as CGI for extracting parameters, rather than matching stuff in QUERY_STRING yourself. As a side effect, it would also provide features such as sticky form values, which might come in handy in this case (if the user has already entered stuff in the existing fields).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl + cgi - onclick generation problem
by matrixmadhan (Beadle) on Dec 11, 2008 at 07:09 UTC | |
by almut (Canon) on Dec 11, 2008 at 07:28 UTC | |
by matrixmadhan (Beadle) on Dec 12, 2008 at 10:26 UTC | |
by matrixmadhan (Beadle) on Dec 12, 2008 at 11:07 UTC |