Can ColdFusion Builder parser ignore single pound sign in javascript?

New Here ,
Sep 21, 2015 Sep 21, 2015

Copy link to clipboard

Copied

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>

TOPICS
Builder

Views

253

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 29, 2015 Nov 29, 2015

Copy link to clipboard

Copied

LATEST

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines