JSStringFormat() not escaping everything..

Posted on 2007-09-27
Last Modified: 2013-12-24
I am using the following line in my code to populate a DIV on my page..

 obj.innerHTML = '#JSStringFormat(variables.content)#'

The variable "variables.content"  holds some coldfusion generated HTML
This has always worked in the past, until I put <CFCHART>  in the .cfm file.  The chart format is FLASH.

Now I get an error on the line...
 obj.innerHTML = '#JSStringFormat(variables.content)#'
that says "Unterminated String"    

JSStringFormat() has always handled escaping the characters for me, until including this flash (it doesn't fail for CFCHART using a graphic format).

Does anyone have an experience with this?  
Is there some other way to 'escape' the code?  Why does it fail with flash ?
Question by:gdemaria
    LVL 9

    Accepted Solution


     obj.innerHTML = "JSStringFormat('#variables.content#')"


     obj.innerHTML = JSStringFormat('#variables.content#')
    LVL 39

    Author Closing Comment

    They didn't work, but I appreciate the effort.  Sorry to have forgotten about the question.  Turns out we switched to another method for other reasons so it became a non-issue.  

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    PROBLEM: How to add your own buttons to the bottom toolbar with paging info ( result count ). While creating a cfgrid, I ran into an issue where I wanted to embed my own custom buttons where the default ones ( insert / delete / etc… ) are for aes…
    One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
    This video discusses moving either the default database or any database to a new volume.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now