This topic is locked
[SOLVED]

Parse error: syntax error, unexpected 'order' (T_STRING) in C:\Projects\Costing\output\buttonhandler

10/6/2022 6:50:14 PM
PHPRunner General questions
J
Joe S. author

i get this error for all custom buttons, not sure why or how to troubleshoot it. it's only this one project.
I have an few buttons that run code, but even a brand new with just the "standard code" will throw this error

BEFORE
params["txt"] = "Hello";
ajax.setMessage("Sending request to server...");

SERVER
$result["txt"] = $params["txt"]." world!";

AFTER
var message = result["txt"] + " !!!";
ajax.setMessage(message);

Any thoughts?

admin 10/6/2022

The code for all buttons is located in buttonhandler.php file. This means if any of button's code has a syntax error, it will break all other events.

The error message comes with the exact line of the code where it happens. Open buttonhandlder.php file in any text editor, proceed to the line on question - it will help you locate and fix the error.

J
Joe S. author 10/7/2022

thanks, that did it