Hola John,
Maybe we can specify a bit more what is needed. Certainly, it's possible to create AB controls at runtime (or any other kind of control, just by providing the right HTML markup and Javascript code), however, I am not sure if this apply to non visual controls like the HTTP control. But the point, in this case, is that we no need to use the HTTP control, that is, we can use the jQuery "post", "get", or even the "ajax" methods, in order to perform HTTP calls and get ready for the "done" and "fail" events.
The creation of AB controls in runtime is not documented, because in fact we rarely need something like that, and, on the other hand, we can create the controls by using the right HTML markup and Javascript code. It's possible to do it, but, maybe not really needed. You can get what is needed in the app's views HTML (once compiled) and the "app.js" objects that every control has. As a sample, you can place the bellow HTML markup in an HTML control in an app's view:
And then you can place the bellow Javascript code, which defines the "dab-push-button":
However, it's also possible to place a button in this way, by providing the right HTML markup and Boostrap CSS, which as you know is the framework used in DecSoft App Builder. Again, you can place the below HTML markup inside an HTML control in an app's view:
And then you can place the below Javascript code in the app's view Show event:
Note the "unbind().bind()" use: this is to avoid to attach twice the "click" event of the button, for example, if we goto another app's view and then go back to the view which attach the event. If we don't "unbind" the event, then the "click" event can be executed twice, which probably is not what we expected. We can also use here a possible global variable in order to avoid a double event attaching.
If this don't answer your, please, John, don't hesitate to post here any further questions.
Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.
This website uses some useful cookies to store your preferences.