-1
    var html = html + "<tr>\n" + "<td style='text-align: center; background-color: #FFCE43;
'> </br>" + $(n).find("Julio").text() + " <img   style = 'cursor: pointer;' onclick='myFunction('"+a+"')' src='add.png'></td> </tr>";

I'm trying to pass the a as parameter but no success, i'm having trouble with combination of "", ''.

Benny BuAc
  • 55
  • 1
  • 1
  • 11
  • What error do you get if any? Look at your console output – lumio Jul 15 '17 at 02:05
  • possible duplicate of [pass string parameter in an onclick function](https://stackoverflow.com/questions/9643311/pass-string-parameter-in-an-onclick-function) – Kevin Jul 15 '17 at 02:07

1 Answers1

1

Replace with below code will work.

var html = html + "<tr>\n" + "<td style='text-align: center; background-color: #FFCE43;
'> </br>" + $(n).find("Julio").text() + " <img   style = 'cursor: pointer;' onclick='myFunction(\""+a+"\", \""+b+"\")' src='add.png'></td> </tr>";