I am trying to set some javascript variables to their corresponding Actinic variables on my receipt page. Most of the variables are working, but the InvoiceName variable is causing a problem because when it is written out, it puts a line break at the end of the value. This causes problems in the javascript because it causes a line break in the middle of the string. My layout code looks like this:
var name = '<actinic:variable encoding="perl" name="InvoiceName" selectable="false" />';
var address1 = '<actinic:variable encoding="perl" name="InvoiceAddress1" selectable="false" />';
When the page is rendered, the html source code looks like this:
var name = ' John Doe<BR>
';
var address1 = '123 West Ave<BR>';
Notice how there is a line break after the first line.
Does anyone know how to fix this? I tried different encoding types for the variable but none of these do the trick (and some of them don't work). Is there a different variable I can use.
Any help would be appreicated.
var name = '<actinic:variable encoding="perl" name="InvoiceName" selectable="false" />';
var address1 = '<actinic:variable encoding="perl" name="InvoiceAddress1" selectable="false" />';
When the page is rendered, the html source code looks like this:
var name = ' John Doe<BR>
';
var address1 = '123 West Ave<BR>';
Notice how there is a line break after the first line.
Does anyone know how to fix this? I tried different encoding types for the variable but none of these do the trick (and some of them don't work). Is there a different variable I can use.
Any help would be appreicated.
Comment