in reply to CGI submit running sub routine

Usually a form will call a script with parameters from the form as CGI parameters that are retrievable via $cgi->param('my_param');. You will be making a POST request usually (in my experience anyway). It can even call the same script (I don't know how good/bad of an idea that is), so long as the script can determine who called it, you would be ok.

Say you have a hidden CGI parameter from that form called source. You'll make the value of that parameter "register", so that when the script checks the value of source it knows roughly what parameters it can expect to receive, and can take action accordingly. This is just an idea. the suggestion you are making is roughly "Javascriptish" in that the action would happen immediately and not need to be reposted, but as with server side scripting, the request needs to be made to the server with the new information in order to properly handle your request.


Grygonos