Javascript Error - Single Quote breaks the parameter
I am using dataTable to populate a list of data. It uses rowOnClick option to pass set of paramteters.
Some of the values have ' (single quote) in them. When I click on it, complains the parameter is not complete. For example:
onClick ="CallData('firstname', 'address's' )"
See the address has a ' in it. How can I replace this values. I tried to use replaceAll method and tried to replace with ´ and \'. JSF does not accept them.
What is the common solution for this?. I cannot replace them inside the code also. Since It is a List.
Any tips would be highly appreciated.
Yogi

