if you dont fill it in quick enough it will change
hehe... nah.. it wil only start timing out when the submit button is pressed... 20 timeout ticks is too short to do anything except blink... the reason for using timeout instead of setting the window.location first is that the form might not submit atall if the browser changes location before the form has been submitted.
CGI is quite a general term... it means Common Gateway Interface, and gramatically, the way I used it in that post was wrong.
CGI script is a better term; in the-most-basic terms, a CGI script is a program that you can access as if it were a webpage.
I think you can probably write CGI script in any programming language that supports character input and output... but the most common CGI languages today are PHP, ASP, and maybe Perl.
The kind of CGI script you'd want to write for the mailing purpose would need to accept the input sent to it from your HTML form (that's going in through the "Common Gateway"); perform a server-side mailing operation based on the input recieved, and then send Redirect 301 and Location headers to send the user's browser to the next page (that's going out of the 'Common Gateway')
So, I'd say you need a language that provides mail support 'automatically'; I'd advise PHP (only because it's very widely supported on different server platforms). Personally, Perl is always my first choice..
If you want to learn PHP and CGI at the same time, perhaps this will be helpful:
http://www.communitymx.com/content/a...ge=2&cid=D5084
When you know the basics, finding out how to send mail from your server is the next part.. This will differ vastly depending on who you buy your hosting from and how much you pay. Some hosts offer extremely restricted script-based emailing to prevent abuse.. Other hosts offer totally unrestricted scripting but very little user support... the best hosts for non-experts are usually in the middle somewhere.
Once you know whether you can send email, and if theres any special rules you need to adhere to; languages like PHP and Perl make the rest simple(r). Generally, they'll provide a function or module that you can use (something like
send_mail(where,to,from,etc)). At worst, there'll be lots of user guides/walkthroughs/code samples on the Internet that can adapt for your purposes.
When you access a CGI script, the server where you host your website runs the script; and the mail function that you've used will cause the server to actively send the mail using its own internal programs, rather than prompt the user to send mail through their desktop mail client. That means (providing your script is written correctly) your script is always going to work, regardless of how or who accesses your page.
The last bit would be redirecting the user. If you get that far, you'll be able to find out how to do that =)
I hope that's been a bit helpful..