Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

auto-email data input

Status
Not open for further replies.

soonkhoo

Programmer
Dec 8, 2000
133
MY
Hi,

I built a quiz test using PERL, with that, I could send scores and users' data by email to me for record. I wonder if Javascript could also record a simple data such as scores in txt form and send the data to me through email. Thanks.
 
Of cause you can - you should create form with hidden fields and fill them from javascript. Then you have following options:
1. pray that your client have correctly configured mail in his browser and use action="mailto:..."
2. write (or stole somewhere) simple program that will send same letter on server.

as you can see i recommend second version.

PS: Sorry for my English
PPS: Need more details?
Michael Dubner
Brainbench MVP/HTML+JavaScript

 
So where can I find the syntax for emailing a specific variable to a specific email location? Say the variable is "result", the form name is "Score" and the email location is something@yahoo.com?

say the result=3

<script>
document.write(&quot;<FORM ACTION=\'+email+\' METHOD='+method+'>&quot;)
document.write(&quot;<INPUT TYPE=submit VALUE=\'send\'>&quot;)
document.write(&quot;<INPUT TYPE=hidden NAME=score></FORM>&quot;)
document.forms.submit();

Arrrghh... I'm not sure how...
 
I came up a form as far as this...

here is a scenario. Say I have 2 frames, top and bottom.

This form is in the bottom but my variable numcorrect is in the topFrame. It's a counter.

So, how can I record that numcorrect value as a txt form when I email it to myself?

Here is the form.

<form name=&quot;form&quot;
method=&quot;post&quot;
action=&quot;mailto:somebody@domain.com?SUBJECT=Results&quot;
enctype=&quot;text/plain&quot;
onSubmit=&quot;document.form.action+='&cc='+document.form.email.value;return true;&quot;>
<input type=submit value=&quot;Send It&quot;></form>


Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top