[solved]: Howto integrage Validate EAN JS-Code


Antonio Cambule

Here is a small Javascript Validation for EAN Checksum

I have an existing ABScript to validate all fields of an form in a view.
How can i integerate it, and instead of throwing an alert write a message into an variable

thanks and regards
Antonio


DecSoft

Hello Antonio,

First of all, the concept of "forms" doesn't exists in App Builder. We place inputs around views and then can use AB actions to validate that inputs before send it to the server or whatever other use (remember always we send something to the server the user input must be validated in both the client side and the server side too).

Said that, maybe you no need the above Javascript code. However, if you need that Javascript code, certainly you can use it in whatever place, since we can place pure Javascript code between the "StartJS" and "EndJS" actions in any code block or just add the Javascript inside an external file using the app's file manager to do that.

If what you wanted right now is to access app's variables from Javascript code, as well to set app's variables from Javascript code, please, take a look at this program's help tutorial. Here are some examples from that refered tutorial:

Please, Antonio, let me know if you have any further question or if you continue needing help to integrate the above Javascript code into your application.

P.S. Another possible way to integrate Javascript code in our apps is to use the app's functions. We can add any number of Javascript functions (and also AB Script functions) to our applications, in addition to place the Javascript code between the "StartJS" and "EndJS" actions or use the app's files manager to add some Javascript file.



DecSoft

Hello Antonio,

I decide to write a little sample over the code you shown above in your first post. Please, take a look at this sample application. They contains just one of the possible ways to do the trick and hope they can give some at least some idea.


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.