function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jldenningjldenning 

Sending Long Text Area field to Javascript- failing on <br>

I am trying to pass the Campaign description field (Long Text Area) to javascript.  It works fine for simple text, but doesn't display anything whenever there is a <br> tag in the description field.  How do I parse the description or pass it so that it displays properly?

bob_buzzardbob_buzzard

Are you trying to pass the data that a user has just entered into the description to the javascript (i.e. before it has been sent back to the controller) or are you trying to use the field within some javascript?  If the latter, its worth taking a look at the generated page, as it may be that the HTML formatting is breaking the javascript syntax rules.

 

If the former, can you share with us how you are calling the javascript and passing the data?