In C:\db\scripts I have the js1.html file referred to under the Script1 label above:
document.write("This text came from js1.html !");
The net result is a form that looks like this at design-time:
(Save and/or expand this image if you need to see it more clearly)
And it looks like this at run-time:
There is another option for using scripting to control ActiveX controls and other special features. DesignBais allows you to launch a modal window to any URL you want. Use DBCALLURL from BASIC or specify a URL as the process to call on field events. With this you can open a custom web page, perhaps just a small dialog, to perform functions and then when the user closes that page they are back in their application. Depending on the consistency of the styles, the user may not realize he/she is is not even using a DesignBais form anymore. You can even launch a page that executes some function like scanning a document or printing to a local printer, and then have the page close itself.
Now that you know more about scripting with DesignBais, do you have an application for it? Are you going to try it? Why or why not? Feel free to comment or to request specific examples.
|Nebula Research and Development provides consultation and programming services for implementing the techniques described in this article. Examples of DesignBais extensions include creation of customized popup calendars, integrating forms with remote Web Services, exchanging data with Microsoft Outlook (Appointments, Calendars, Tasks, Contacts, Journals, Notes), importing and exporting Excel data, and integration with other software and hardware products. Please email for more information.|