8.1 - Ajax buttons on form <-- how do they work?

Is there any documentation on how to use the new Ajax buttons?

Shall I write JS or PHP code inside these new buttons?

That is what you can do indeed. We use the php button to open a popup window.
In a php button you put php (of course). Just put an alert in your javascript button or some php code in your php button and that is it, it just simply works…
Kinda simple…

@rr thanks.
what is a bit misleading is that the header on the top of the coding are says “PHP code” but in the table above theres’s this entry: “Type: Ajax – Code language of execution.”
And AFAIK AJAX code is JS.

Ajax : asynchronous Javascript And XML

Can you give us a code snippet IT ? I don’t understand your answer(s). I still don’t know if I’m supposed to put PHP or JavaScript into an AJAX button that has “PHP Code” as the title of the code box.

You enter php in there (see the manual).
http://www.scriptcase.net/docs/en_us/v81/manual_mp.htm#form-applications/form/events/ajax-events

Just make an ajax event on an editable field on for example the onClick event and add as code:
sc_alert(“clicked”);

That is about the simplest example you can find…
You can basically hang your php code under it.