Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

Re: Pass ColdFusion variable to the JavaScript window

$
0
0

Ilssac - not sure why you say this - but it is absolutely not correct. Coldfusion is a serverside application code and can pass coldfusion based variables into Javascript code which will be executed on the client side like all the other HTML related code.

 

Take
<cfset somevar = "##FF0000">

<cfoutput>

<script type="text/javascript">

                    $(function () {Highcharts.setOptions({

        chart: {backgroundColor: {#somevar#....

 

This way you take your CF based content as a variable and pass it on to a javascript that runs on the client.


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>