HighDots Forums  

send email when condition it met

Javascript JavaScript language (comp.lang.javascript)


Discuss send email when condition it met in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
canajien@gmail.com
 
Posts: n/a

Default send email when condition it met - 03-18-2008 , 09:22 AM






I have a form that stores information in a table, but I also need it
to send an email when a specific question, among the many, is answered
with no

the question is a simple drop box:

<select name="safe_access">
<option value="0"></option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>

and the javascript validation is:

//safe_access
if ( form.safe_access.selectedIndex == 0 ){
alert ( "Please select whether or not there is safe access to the
beach." );
form.safe_access.focus();
return false;
}

how do I get it to send an email, and still store information in the
table when someone answers no?

I've done several searches, but they all keep bringing up how to email
the form instead of what I am looking for.

Thanks



Reply With Quote
  #2  
Old   
GArlington
 
Posts: n/a

Default Re: send email when condition it met - 03-18-2008 , 09:31 AM






On Mar 18, 1:22 pm, "canaj... (AT) gmail (DOT) com" <canaj... (AT) gmail (DOT) com> wrote:
Quote:
I have a form that stores information in a table, but I also need it
to send an email when a specific question, among the many, is answered
with no

the question is a simple drop box:

select name="safe_access"
option value="0"></option
option value="yes">Yes</option
option value="no">No</option
/select

and the javascript validation is:

//safe_access
if ( form.safe_access.selectedIndex == 0 ){
alert ( "Please select whether or not there is safe access to the
beach." );
form.safe_access.focus();
return false;

}

how do I get it to send an email, and still store information in the
table when someone answers no?

I've done several searches, but they all keep bringing up how to email
the form instead of what I am looking for.

Thanks
Do you intend to store the data in the table AND send email via
javascript?
Or do you have some server-side script to do it for you?


Reply With Quote
  #3  
Old   
canajien@gmail.com
 
Posts: n/a

Default Re: send email when condition it met - 03-18-2008 , 09:51 AM



On Mar 18, 9:31 am, GArlington <garling... (AT) tiscali (DOT) co.uk> wrote:
Quote:
On Mar 18, 1:22 pm, "canaj... (AT) gmail (DOT) com" <canaj... (AT) gmail (DOT) com> wrote:



I have a form that stores information in a table, but I also need it
to send an email when a specific question, among the many, is answered
with no

the question is a simple drop box:

select name="safe_access"
option value="0"></option
option value="yes">Yes</option
option value="no">No</option
/select

and the javascript validation is:

//safe_access
if ( form.safe_access.selectedIndex == 0 ){
alert ( "Please select whether or not there is safe access to the
beach." );
form.safe_access.focus();
return false;

}

how do I get it to send an email, and still store information in the
table when someone answers no?

I've done several searches, but they all keep bringing up how to email
the form instead of what I am looking for.

Thanks

Do you intend to store the data in the table AND send email via
javascript?
Or do you have some server-side script to do it for you?
right now the form action sends the information to a php script which
stores the information in the table:

<form action="thankyou.php" method="post" name="form" id="form">


Reply With Quote
  #4  
Old   
canajien@gmail.com
 
Posts: n/a

Default Re: send email when condition it met - 03-18-2008 , 10:54 AM



On Mar 18, 9:31 am, GArlington <garling... (AT) tiscali (DOT) co.uk> wrote:
Quote:
On Mar 18, 1:22 pm, "canaj... (AT) gmail (DOT) com" <canaj... (AT) gmail (DOT) com> wrote:



I have a form that stores information in a table, but I also need it
to send an email when a specific question, among the many, is answered
with no

the question is a simple drop box:

select name="safe_access"
option value="0"></option
option value="yes">Yes</option
option value="no">No</option
/select

and the javascript validation is:

//safe_access
if ( form.safe_access.selectedIndex == 0 ){
alert ( "Please select whether or not there is safe access to the
beach." );
form.safe_access.focus();
return false;

}

how do I get it to send an email, and still store information in the
table when someone answers no?

I've done several searches, but they all keep bringing up how to email
the form instead of what I am looking for.

Thanks

Do you intend to store the data in the table AND send email via
javascript?
Or do you have some server-side script to do it for you?
right now the form action sends the information to a php script which
stores the information in the table:

<form action="thankyou.php" method="post" name="form" id="form">


Reply With Quote
  #5  
Old   
GArlington
 
Posts: n/a

Default Re: send email when condition it met - 03-18-2008 , 12:52 PM



On Mar 18, 1:51 pm, "canaj... (AT) gmail (DOT) com" <canaj... (AT) gmail (DOT) com> wrote:
Quote:
On Mar 18, 9:31 am, GArlington <garling... (AT) tiscali (DOT) co.uk> wrote:



On Mar 18, 1:22 pm, "canaj... (AT) gmail (DOT) com" <canaj... (AT) gmail (DOT) com> wrote:

I have a form that stores information in a table, but I also need it
to send an email when a specific question, among the many, is answered
with no

the question is a simple drop box:

select name="safe_access"
option value="0"></option
option value="yes">Yes</option
option value="no">No</option
/select

and the javascript validation is:

//safe_access
if ( form.safe_access.selectedIndex == 0 ){
alert ( "Please select whether or not there is safe access to the
beach." );
form.safe_access.focus();
return false;

}

how do I get it to send an email, and still store information in the
table when someone answers no?

I've done several searches, but they all keep bringing up how to email
the form instead of what I am looking for.

Thanks

Do you intend to store the data in the table AND send email via
javascript?
Or do you have some server-side script to do it for you?

right now the form action sends the information to a php script which
stores the information in the table:

form action="thankyou.php" method="post" name="form" id="form"
This question that may be answered "yes" or "no", and you want to act
when the answer is "NO",
it is NOT to the tune of "Do you want to subscribe to our newsletter
(and other unsolicited mail)?"
Is it?


Reply With Quote
  #6  
Old   
canajien@gmail.com
 
Posts: n/a

Default Re: send email when condition it met - 03-18-2008 , 01:52 PM



On Mar 18, 12:52 pm, GArlington <garling... (AT) tiscali (DOT) co.uk> wrote:
Quote:
On Mar 18, 1:51 pm, "canaj... (AT) gmail (DOT) com" <canaj... (AT) gmail (DOT) com> wrote:



On Mar 18, 9:31 am, GArlington <garling... (AT) tiscali (DOT) co.uk> wrote:

On Mar 18, 1:22 pm, "canaj... (AT) gmail (DOT) com" <canaj... (AT) gmail (DOT) com> wrote:

I have a form that stores information in a table, but I also need it
to send an email when a specific question, among the many, is answered
with no

the question is a simple drop box:

select name="safe_access"
option value="0"></option
option value="yes">Yes</option
option value="no">No</option
/select

and the javascript validation is:

//safe_access
if ( form.safe_access.selectedIndex == 0 ){
alert ( "Please select whether or not there is safe access to the
beach." );
form.safe_access.focus();
return false;

}

how do I get it to send an email, and still store information in the
table when someone answers no?

I've done several searches, but they all keep bringing up how to email
the form instead of what I am looking for.

Thanks

Do you intend to store the data in the table AND send email via
javascript?
Or do you have some server-side script to do it for you?

right now the form action sends the information to a php script which
stores the information in the table:

form action="thankyou.php" method="post" name="form" id="form"

This question that may be answered "yes" or "no", and you want to act
when the answer is "NO",
it is NOT to the tune of "Do you want to subscribe to our newsletter
(and other unsolicited mail)?"
Is it?
the question is actually:

Is there safe access? (yes/no)

it's one of many questions, but if the answer to this one is no than
an email needs to be sent to another person alerting them of the
problem ASAP instead of waiting for them to look at all the answers at
a later time, the person filling out the form isn't asked for their
email


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.