Skip to main content
September 21, 2015
Question

Can ColdFusion Builder parser ignore single pound sign in javascript?

  • September 21, 2015
  • 1 reply
  • 328 views

We have many existing scripts that don't seem to behave in ColdFusion Builder 3. Wherever we have jQuery selectors that use the id selector $("#..."), the function collapsing stops on the first line where the id selector is used. It becomes annoying since the remainder of the file will not collapse. I'd prefer not to have to wrap every selector in cfoutput so I can escape the pound sign.

The javascript is being saved in cfsavecontent tag. Below is a simplified code snippet. Function collapsing stops at the bold line and the remainder of the file does not collapse.

<cfcomponent displayname="content">

...

<cffunction name="getHomeContent" returntype="string">

<cfset var html = "" />

<cfsavecontent variable="html">

...

<script>

$('#myid').change(function() {

$('#myid-nav').val($('#myid').find(':selected').val());

});

</script>

...

</cfsavecontent>

<cfreturn html />

</cffunction>

...

</cfcomponent>

This topic has been closed for replies.

1 reply

Carl Von Stetten
Legend
November 30, 2015

My guess is that CFBuilder isn't picking up on the switch from CFML to Javascript in the same code block.