Link to home
Start Free TrialLog in
Avatar of swansonplace
swansonplace

asked on

How to encode javascript function parameter to take a single quote

How to I encode data going across to a javascript routine.

The javascript function has a variable "testing's" with a single quote.  I need to pass the single quote, but the javascript keeps getting confused with it.

a href="#" onclick="javascript: openAdditionalInfoWindow('testing's')">Test </a      
                     <!
ASKER CERTIFIED SOLUTION
Avatar of Zyloch
Zyloch
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of swansonplace
swansonplace

ASKER

Thanks.  I had the \ the wrong way.  Why didn't it take  '' which is two single quotes.