I couldn’t find the answer in any of my CF Books, so I ask you the experts…
When using JavaScript and ColdFusion within the same document, is it possible to set the value of a ColdFusion variable to that of a Variable in JavaScript?
Example:
Say I wanted to do the following…Or something similar
------------------------------------------------------------------------------------
<cfset Var1 = "ColdFusionVariable">
<cfoutput>
<script type="text/javascript">
var jscriptVariable = #Var1#
document.write("jscriptVariable"
</script>
</cfoutput>
------------------------------------------------------------------------------------
So when the js document object is run, “ColdFusionVariable” is printed.
Thanks in Advance!!!
When using JavaScript and ColdFusion within the same document, is it possible to set the value of a ColdFusion variable to that of a Variable in JavaScript?
Example:
Say I wanted to do the following…Or something similar
------------------------------------------------------------------------------------
<cfset Var1 = "ColdFusionVariable">
<cfoutput>
<script type="text/javascript">
var jscriptVariable = #Var1#
document.write("jscriptVariable"

</script>
</cfoutput>
------------------------------------------------------------------------------------
So when the js document object is run, “ColdFusionVariable” is printed.
Thanks in Advance!!!