I have a button in HTML and in the onclick
event I get few arguments. My argument is something that looks like this:
javascript:Email('Andy.n@gmail.com' ,'19','1','2017','106 O'Horg St, Del-5th floor boardroom')
Now the problem is in this value '106 O'Horg St, Del-5th floor boardroom',
Since I have O'
in my value, my complete string is broken and I am not able to use it. Can anybody help me how to resolve this?
Here is my sample code where I am taking data and evaluating.
onclick="javascript:Email(\''+facilityOwnerEmail+'\' ,\''+i+'\',\''+monthNumber+'\',\''+yearnum+'\',\''+locArray[j][0]+'\')"
I can not replace ' by any other character, as it will then not match with the data in back-end.