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

CFIF for CFmail

Status
Not open for further replies.

sirnose1

Programmer
Nov 1, 2005
133
US
I have a coldfusion page that emails to some recipients. There is a <CfIF> that means that if a hidden field has a certain value based on a checkbox it will add the header information bto the email. The javascript works

function TestChk(){
var checkbox = document.getElementById('chkTestAcct')
,hidden = document.getElementById('ToTestAcct');
checkbox.addEventListener('change', function(){
hidden.value = (this.checked)? 'Yes' : 'No';
//alert("Hidden value: '" + hidden.value + "");
}, false )
}

When implenting this code I get the 500 error:
<cfif #form.ToTestAcct# EQ "Yes">
<cfoutput>Its Yes</cfoutput>
<cfmail
from="nbeo@optometry.org"
subject="Registration Information"
to="brian.mccown@optometry.org"
BCC="nbeo@optometry.org"
type="html">
<cfelse>
<cfmail
from="nbeo@optometry.org"
subject="Registration Information"
to="bmccown8@gmail.com"
CC="gregorio.zambrana@optometry.org"
BCC="nbeo@optometry.org"
type="html">
</cfif>
What am I doing wrong? This should work. Thanks in advance.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top