Let's say I have a javascript function that displays an alert message, like:
<script type="text/javascript" language="JavaScript">
function SONSFX_Combo(status) {
if (confirm("That Son and SFX Combination already exist. Do you want to save your new order anyway?")) {
return true;
}
else {
return false;
}
}
</script>
Then in my cold fusion code, I call it:
<CFIF #COUN2# GTE 1>
<script language="JavaScript">SONSFX_Combo();
</script>
<!--- <FONT class="redheader">SONFSX Error</font><br>--->
<FONT class="redheader">SONFSX Error</font><br>
<cfset errors=errors+1>
</CFIF>
How do I check for the return value of true or false from the alert message? AND how could I simply set the errors variable to errors=errors+1 if it is false, and errors=0 if it is true? Can I set the cold fusion variable within the javascript?
<script type="text/javascript" language="JavaScript">
function SONSFX_Combo(status) {
if (confirm("That Son and SFX Combination already exist. Do you want to save your new order anyway?")) {
return true;
}
else {
return false;
}
}
</script>
Then in my cold fusion code, I call it:
<CFIF #COUN2# GTE 1>
<script language="JavaScript">SONSFX_Combo();
</script>
<!--- <FONT class="redheader">SONFSX Error</font><br>--->
<FONT class="redheader">SONFSX Error</font><br>
<cfset errors=errors+1>
</CFIF>
How do I check for the return value of true or false from the alert message? AND how could I simply set the errors variable to errors=errors+1 if it is false, and errors=0 if it is true? Can I set the cold fusion variable within the javascript?