<input type="hidden" id="downloadFlag" name="downloadFlag" value="0">
variables.downloadFlag = form.downloadFlag;
<cfif (variables.downloadFlag eq "1")>
<cfscript>
variables.d_srx = CreateObject('component','mycfcpage');
variables.d_success = variables.d_srx.download_files(variables.q_data);
</cfscript>
document.getElementById('downloadFlag').value = 0;
</cfif>
that executes the download function on a CFC page if the value of the flag="1". What I need to do after the function has executed is re-set the value of the flag back to 0. That's what I try to do on the line:document.getElementById('downloadFlag').value = 0;
ASKER
<cfif (variables.downloadFlag eq "1")>
<cfscript>
variables.d_srx = CreateObject('component','Srx_Files');
variables.d_success = variables.d_srx.download_files(variables.q_data);
</cfscript>
<script>
alert("Re-set flag...");
document.getElementById('downloadFlag').value = 0;
</script>
</cfif>
but I didn't see the alert, and the flag is still 1:ASKER
JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.
TRUSTED BY
This is an easy thing to trip over/lose track of. The languages look similar but are very different. Let us know if that solves the problem.