[QUOTE=diogo;3551]sc_ajax_javascript is to use when you have ajax functions … like the events of the fields(onchange, onclick…).
When you submit a form, the form is submitted and the php code is executed(onValidate, onValidateSeccess or Fail …) so, you cant execute javascript on the server side. JavaScript is on the client side(browser).
If you want to execute javascript, edit the itself.
Form menu -> Javascript.[/QUOTE]
I use php to javascript option because not know another way to do it. The point is I want to run the php code, send a message to the user to
‘Accept’ or ‘cancel’ and function of the selection of the option, php app execute one form or another grid.
How I can do it, with your explication ??
The code I use is as follows:
php (OnValidate) -----
sc_ajax_javascript (‘ValidarOpcion’);
if ({field_Result == ‘yes’) {OpenForm}
…
javascript ------
ValidarOpcion () {
if (confirm (‘Would you like continue?’)) {
{ Field_Result } = 'True';
} Else {
{ Field_Result } = 'False';
}
}
How I can do it, with your explication ?? (Form menu-> Javascript)
thanks