I would like to add a function in an onclick with 3 parameters: int, int, string. The string parameter that contains an HTML and other quotations. Would it be possible?. I saw it here pass string but it is not working on my case.
<p onclick="myfunction(0,3,'<b">FirstName =
\"Dondellx\"\n<b>LastName</b> = \"Batacx\"\n<b>path</b> =
\"xxxpath\""');dondell
</p>
This function that contains the String with many \\ characters are actually from a JSON file which I put in a "p" tag in a loop when reading the JSON.
This is what i am doing to get the JSON item and put to the string param;
//This is a for loop
<p onclick="myfunction(0,3,'dataFromJSon[0]')"></p>
<p onclick="myfunction(0,3,'dataFromJSon[1]')"></p>
<p onclick="myfunction(0,3,'dataFromJSon[2]')"></p>
This is the text editor to enter my Text. As you can see, I have quotations in the textArea, so that is why i need to save it with qoutations. :
This is the JSON: