xxxxxxxxxx
// Most effective way to call a javascript function with parameter of PHP variable
echo '<input type="button" value="Button" onclick="return openEditor(\'' . $path_image . '\')">';
xxxxxxxxxx
var deleteClient = function(id) {
$.ajax({
url: 'path/to/php/file',
type: 'POST',
data: {id:id},
success: function(data) {
console.log(data); // Inspect this in your console
}
});
};
xxxxxxxxxx
<?php echo "<script> autoFill(".$dropDown.", ".$emptyDropDown."); </script>"; ?>