+ Start a Discussion

assign {!Account_FullBillingAddress} to a javascript variable


I am having a problem while crating a scontrol.

I want to assign the value of {!Account_FullBillingAddress} to a javascript variable,
when i do that

var test = "{!Account_FullBillingAddress}";

It gives an error "Unterminated string constant" ,(whenever there is a new line charachter inserted by user in account street).

Is there any way to assign this address to a variable.
Please reply.

What I do is use a hidden div tag and put the variable in there and use getElementById to retrieve the value...