Dear all i have code below
server event-global-all page-global code :
$API_ACTIONS["getProductByName"] = function(Request $request, Response &$response) {
$name = Param("name", Route(1)); // Get parameter from $GET or $POST
if ($name !== NULL)
WriteJson(ExecuteRow("SELECT * FROM t_dpr WHERE no_pr = '" . AdjustSql($name) . "'"));
};
table spesific-add/copy page - startup script :
$.get("api/?action=getProductByName&name=PR00000001", function(res) { // Get response from API
console.log(res); // Show the result in console
alert(res);
alert(res);
the result is nothing any idea or something wrong with my code.