When you want a form that can be submitted without requiring the rather prominent submit button, this article shows you how, with several methods:
This article contains step-by-step instructions with code examples. I think you'll find it easy to follow.
The article assumes you already have a working form that is submitted to a CGI program in the conventional manner, with a submit button. When you see "/cgi-bin/script.cgi" in the examples, substitute the URL of your CGI program.
If you don't already have form and CGI program, consider Master Feedback from http://willmaster.com/master/feedback/ to have the submitted information sent to you via email, or Master Form V3 from http://willmaster.com/master/formV3/ for a program that can also store form information in a database on your server.
With this method, you can cause a form to be submitted when the user clicks on a regular link, which can be a text link or an image link.
This requires two steps.
First step, the form - give your form a name. This is done in the FORM tag itself:
You'll need to add a hidden field to let your CGI program know the URL of the "thank you" page it should use.
Put the form anywhere in the BODY tag. It won't be visible, but it will cause the browser to print a blank line.
The time zone offset is the number of minutes plus (West) or minus (East) of Greenwich Mean Time.
Optional third step — because the automatic submission of the form will load a different page (don't have the "thank you" page be the same page, re-loaded, or it will submit the form each time the page loads, in an infinite loop), you may want to put your automatic form submission page into an IFRAME tag. The "thank you" page can then be an image or other content that you want to display on the page.
To make an IFRAME tag, put this into a web page (a web page different than the web page with the automatically submitted form):
Adjust the URL so the web page containing the automatically submitted form loads into the IFRAME tag. And adjust the height and width to accommodate the "thank you" page.
The web page with the automatically submitted form will load into the IFRAME and, after automatic submission, load the "thank you" page.
(Netscape versions 4.# and earlier don't recognize the IFRAME tag. It's ignored, as if it wasn't there — no extra space, no content, nothing.)
If you decide to test several of the above examples on the same web page, give the forms different names. Otherwise, the browser is likely to become confused about which information belongs to which form.
Have fun with the examples. Once you're familiar with how they work, you can decide whether or not they can be adapted to your unique requirements.