i got the code
$confirm = "if (!confirm('".Module::t("Approve") . "?')) return false;";
$js_approve =<<< EOD
function() {
$confirm
var url = $(this).attr('href');
$.post(url, function(response) {
alert(response);
});
return false;
}
EOD;
is it possible to transform to code like this
$js_approve =<<< EOD
function() {
"if (!confirm('".Module::t("Approve") . "?')) return false;";
var url = $(this).attr('href');
$.post(url, function(response) {
alert(response);
});
return false;
}
EOD;
any ideas?