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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to email a variable 1

Status
Not open for further replies.

msmechanic

Technical User
Jun 20, 2001
2
US
Forgive me--I'm a big fat amateur but I've got a complicated problem and could use some help.

I have used Macromedia's Dreamweaver + Coursebuilder to create a quiz for an e-learning site. The quiz uses javascript.

I want to be able to take the total score of the quiz and, if it's an 80 or above, have the score automatically emailed to the instructor without the user having to enter anything into the form AND have the user dumped to a specific URL.

Basically, I have it working well enough so that the score variable is defined. I can get it to total the score for the user and send them to the URL if it's 80 or above. But I don't know if or how I can get the score automatically emailed without the user having to enter it into another form.

Can anyone help? Thanks very much for your patience...
 
may be href="mailto:ad@dres.com?subj=score" ?
and use cycle wich wuld check if score is as needed...


function emaiil(addr,subj,body){//mailin to smbdy
if(!subj) subj=""
self.location.href="mailto:"+addr+"?Subject="+subj+"&body="+body
}
function sendin(score){
if (score>=80) emaiil("addres.com","","score exeeds 80 - "+score)
}

<form name=one>
<input name=b1 type=button value='email' onclick=sendin(score)'>
</form>

what is the problem?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top