Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   submit form, validate form, set cookie, send email, download file (http://www.velocityreviews.com/forums/t916981-submit-form-validate-form-set-cookie-send-email-download-file.html)

mhawkins19@adelphia.net 03-16-2005 04:35 AM

submit form, validate form, set cookie, send email, download file
 
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="downloadform" method="post"
action="/cgi-bin/cgiemail/mailtemp.txt" onSubmit="return
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.


Randell D. 03-17-2005 08:19 AM

Re: submit form, validate form, set cookie, send email, downloadfile
 
mhawkins19@adelphia.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="downloadform" method="post"
> action="/cgi-bin/cgiemail/mailtemp.txt" onSubmit="return
> 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


All times are GMT. The time now is 08:24 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.