mh********@adel phia.net wrote:
I have a form built and on the onclick event I validate all of the
fields and then if the form is ok, on the submit event I run a
javascript function to set a cookie and download a file from the
current window.
I have a cgi script provided by my web host to send the contents of the
form through email but they only show me how to use the cgi script to
send email through the submit event of the form.
ie. <form name="downloadf orm" method="post"
action="/cgi-bin/cgiemail/mailtemp.txt" onSubmit="retur n
Validate(this)" >
Can I utilize the cgi script/link from my javascript function and still
send the contents of the form through the cgi email??
Thanks.
Javascript is (mostly) client side - your cgi is server side - so the
short answer to your question is No... however... that does not mean
that you cannot do what you want to do... It all depends on the cgi
script on the server and what it is designed to do. If the server
script is designed to be passed a "to" address and message text, but if
its not expecting a file (assuming you want to send the file via email)
then you're out of luck - The limitation is not javascript as it does
not do the physical sending... your cgi does that bit...
Chances are your cgi is written in Perl or PHP... if you have access to
the source of it, I would suggest you ask someone in either of those two
newsgroups to help you out... you'll have more luck there...
I hope that helps,
randelld