missing fiels in ajax event or trap ALL errors!

Hello
I ask what is the ‘right’ way to pass parameters in ajax event?
Is there an option to indicate that all fields must be passed or to make them all available, regardless of the new fields that could be added later, without doing it manually?

The trapping of the error related to the missing fields or Undefined could also be useful.
How can I activate an error if this happens?
I added in the form these 2 lines both in onLoad and in ajax event
in php: error_reporting = E_ALL
in sc: sc_warning = ‘on’;
but it doesn’t show me anything!

Another example :
If I run the form on onLoad:


echo "-".$x;

out error ‘Undefined variable: x’: right!

if the same code I put it in ajax event ‘onChange’ this does not appear and skip it without error message!

I activated, in application:
Script Error, SQL Error, Debug Mode, Ajax Error Output

How can I avoid this inconvenience so as not to leave out some parameters and produce serious logic errors (not processed) in the app.

Where am I wrong?

Hello everybody
Thank you
Enrico

since the last version $x seems to be used by the system, try with a variable $n or $m and check if the value is correct, it could be one of the causes of this problem

Ciao and thanks for the reply, but that’s not the problem and the tenor of my post.
That was just one example where in ajax event it doesn’t trap the error.
The code above was short, but if I used a form field on it I can’t do processing, I can’t make it visible or read only.
All without any error message.

Ajax script with some sort of error should leave some traces on the Apache error log file. Did you look into it ?

Thank you.
Using nginx, I have already looked in the logs, but no error appears in this regard.
In practice, when an ajax event processes a non-passed field as a parameter, it follows all subsequent instructions without processing, without errors, until the end!

Yes you are right. The same happens to me.
Moreover I cannot figure out why sometime a field is not passed in an ajax event despite is flagged to be passed. Without any sort of error message is difficult to debug.

You said Massimiliano very well.
The biggest problem is that no error appears

Today scriptcase answered me and it seems that the problem is solved MANUALLY adding the parameters in the functions called in ajax event.
I did a test and it seems to resolve.
Instead of passing the parameters from the selection I write:
f_test ({field_1}, {field_2}, {field_3});
in the function f_test I can use the fields field_1 / 2/3 … without logic errors / processing!
An error does not appear, but at least I manually manage the fields and see them correctly.
This time I have to say thanks to scriptcase that has worked to resolve an anomaly!
Thread closed and solved.