+ Start a Discussion

Apostrophe problem in javascript

I have a javascript that creates a clone of an opportunity from a "locked" one.  We lock certain fields on the opportunity (via record type) after it passes audits with the billing system.  I have a function that replaces ampersands and apostrophes in the string fields such as the Opportunity Name.  The problem I am having is that I am getting an error on the code that is attempting to extract the Opportunity Name from the screen and pass it to the function. 

// name=stringedit('{!Opportunity_Name}') + " - " + order;

Any suggestions on how to get around this problem?


Message Edited by ddoelling on 08-05-2005 11:13 AM

I believe this has been solved before by placing the Opportunity Name in a textarea field that has a unique id and calling getElementById to obtain the value...