Re: Button on a grid row, execute a simple php function
try to do something like this …
create a new field on the grid and execute this code on the onRecord event:
{new_field} = “<input type=“button” value=“teste” name=“teste” onclick=“window.location=’”. $_SERVER[‘PHP_SELF’] .”?code=". {FIELD_CODE} ."’;">",
this mean that you will re-open the grid passing the parameter code with the value of the field FIELD_CODE that you want to do something.
In the event onScriptInit you can check if the parameter is set and do what you want.
if($_GET[‘code’])
{
//do what you want
}
I didnt tested this example, i just write down to you. You can adapt to display a link, image, button … what you want. I just tryed to pass the idea.