in reply to perl + cgi - onclick generation problem

(Note that there are more than one kind of Java script, not just in terms of version numbers.)

There is nothing, in what you have shown, stopping you from adding infinite number of widgets (unless the user's client dies). You would just keep the action attribute (of the form) set to the Perl program which outputs additional set of widgets. Am I missing something?

Of course, you could write the addition of widgets in JavaScript as you originally mentioned. Same difference, other than a CGI program would have to maintain state of all the previous widgets resulting in a seemingly useless trip to the server. OTOH, JavaScript will not work where it does not, obviously.