Help with escaping quotations in String that represents js string
Hello all,
I am constructing html / javascript from a class file.
I have a String as follows:
itemGeoLink ="<a href=# onclick=top.myframe.alertMe("+itemLon+","+itemLat+")>Click</a>;
Now the resulting String (System.out) is:
<a href=# onclick=top.myframe.alertMe(5.44,3.33)>Click</a>
What I need is:
<a href=# onclick=top.myframe.alertMe("5.44","3.33")>Click</a>//Notice the quotation marks.
Normally I would just insert an apostrophe but this string is being used in a json file so the apostrophe would not be compatible with my json file.
Thanks in advance.

