in reply to Re^2: CGI "control panel" app
in thread CGI "control panel" app

The only real difference between a CGI script and "not_a_cgi.pl" is that the former prints its results back to the browser along with a content-type header. If you are going to access the script via a regular HTML form submit, you need it to print something back, even if that something is just the same form getting redisplayed. If you use AJAX, you can make it so that the checkbox fires off a call to the script without submitting the form or refreshing the page and therefore the not_a_cgi.pl will work fine since it isn't expected to print a content-type header or anything else to the browser. You could also make a little CGI wrapper that calls the not_a_cgi.pl scripts and redisplays the form on success and displays an error message on failure.

Replies are listed 'Best First'.
Re^4: CGI "control panel" app
by mojodaddy (Pilgrim) on Jul 24, 2007 at 05:25 UTC
    "If you are going to access the script via a regular HTML form submit, you need it to print something back, even if that something is just the same form getting redisplayed."

    There it was -- the insight I didn't even know I was seeking. Thank you!