+ Start a Discussion

How to pass Text area field with multiple lines value in an url

I'm tyring to override the New button(using an s-control) of a custom object2which is in the related list of another custom object1
This   s-control auto populates some of the fieds of Custom object2 with the values from custom object1.
This S-control is working fine. But when im trying to pass a field of type Text Area(which has multiple lines), the value is getting trimmed and im getting all the lines clubbed into a single line.
I tried replacing the line feed(\n) with its equivalent but it doesn't seems to be working. For the time being I replaced '\n' with Comma(,).
If any one has any idea how to implement this, please help me to resolve this issue.
Any pointers will be of great help.
Thanks in Advance
You should be able to use the JavaScript escape() method to encode the '\n' character. Here is an example of how I have done it in the past:
<script type="text/javascript" >

var mergeField= escape('{!Account.MergeField');
parent.window.location = "https://na2.salesforce.com—var="+mergeField;


Let me know if you have any more questions.