Im trying to pass a variable into an inline onclick function but without success. i've tried searching and i followed this but with errors(Uncaught SyntaxError: missing ) after argument list) : pass string parameter in an onclick function
google.maps.event.addListener(marker, "click", function(e) {
infoWindow.setContent(data.name+ "<br> '<input type="button"onClick="Myfunction(\'' + data.name + '\')" />');
infoWindow.open(map, marker);
});
I want to pass data.name results inside My function(data.name);
Another thing that i want to process this result inside myfunction to load an image from Mysql php database shall i use Ajax?
'` – Mario Nikolaus Nov 18 '17 at 11:25