Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > submit form, validate form, set cookie, send email, download file

Reply
Thread Tools

submit form, validate form, set cookie, send email, download file

 
 
mhawkins19@adelphia.net
Guest
Posts: n/a
 
      03-16-2005
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.

 
Reply With Quote
 
 
 
 
Randell D.
Guest
Posts: n/a
 
      03-17-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
use an anchor to submit, or set image for submit button mikezx10@hotmail.com ASP General 4 03-23-2010 01:25 AM
Validate form on submit event sergio.leon.leon@gmail.com ASP .Net 2 12-19-2008 10:24 AM
How to validate() User Control at Page submit? owingruters ASP .Net 4 07-16-2004 04:16 PM
How to send and validate a server certificate Silan Liu ASP .Net Web Services 0 02-22-2004 04:41 AM



Advertisments