hey all...
got some data in an Access database, datatype memo (yeah, i know).
i'm trying to output the values into a javascript array. problem is some of
the fields have line breaks/carriage returns...which cause the js to break.
I've got this as of now:
<cfloop query="getFAQ">
faqArray[#currentRow#][0] = #faqOrder#;
faqArray[#currentRow#][1] = "#replace(replace(answer, """", "\""",
"all"), chr(10), "\n", "all")#";
</cfloop>
which is putting the \n (javascript newline character) into the string...but
still within the code it breaks it up onto multiple lines (as follows):
faqArray[12][0] = 12;
faqArray[12][1] = "If only one jumper is installed and it is from J4-4
to J4-2 the scanner will start and run at \"speed 4\". If you add the
following connections the speeds that will result are:\n
\n
J4-5 connected to j4-7, scanner speed is \"speed option 3\"\n
J4-6 connected to J4-7, scanner speed is \"speed option 2\"\n
J4-5 and J4-6 and J4-7 connected together is \"speed option 1\"\n
(that might not be an accurate representation due to word wrap, but
hopefully you get the idea).
maybe it's just late and i'm brain farting...but how can i get this data to
show up on one line within the code?
thx,
charlie
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm