1 Reply Latest reply on Nov 29, 2015 4:54 PM by Carl Von Stetten

    Can ColdFusion Builder parser ignore single pound sign in javascript?

    jbit1010 Level 1

      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>