Javascript functions and UI Objects


John Clarke
In the Show event of my view I have the following code In this view I also make use of a function that is stored within an eternal JS file.

How can I get the function in the external JS file to update the value in views.headerHTML.automationcode.value ?


DecSoft

Hello John,

I think you have two possibilities, well,... three... if you count to place the function in the Show event, or the app DomReady event. You can also place the function as an app's function, using the app's Functions Manager, then you can use the function's body that you show "as is". And you can also place the function in an external JavaScript file, however, in this case you must use the function's return / result, that is, your code must be something like this:

There is another additionally possibility, John, using some app's internal methods like "app._getCurrentView()", since we have a "window.app" variable that we can use, however, probably the possibilities mentioned above are more recommended. For example, just use the external JavaScript function's return / result can be enough, so we no need to deal with app's internal methods, which maybe can change in the future, etc.


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.