in reply to Detect Stop Button

In addition to the fine points made on this page by other monks, you might want to check out the CGI function cgi_error().

andy.