Save the content of a Scriptcase Form within an event
Sometimes it is necessary to save the content of a Scriptcase form without using the Update or Insert button.
Create a small Javascript method in the Scriptcase Form:
Programming > Javascript Methods > New Method
The name of that method in our sample is: ‘speichere’
The code of the method is only one line:
1 |
nm_atualiza ('alterar'); |
Save when the user exits a field
To save the content use the Ajax-event OnBlur or OnChange.
Sample: Save the data of the form when the user exits the field CityName:
Via PHP Code
The Javascript method can also be called from PHP code to save the data.