In C:\db\scripts I have the js1.html file referred to under the Script1 label above:
<html>
<script>
document.write("This text came from js1.html !");
</script>
</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.
It seems there are valid reasons to have JavaScript and equally valid reasons against it. It will be interesting to see where this goes, what DBI decides to support, etc.. If you do use scripts, be prepared to make changes as new versions of DesignBais come out – when using unsupported features we have no idea how or when things will break.
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. |
4 Responses
sjdorst
11|Aug|2006 1Tony,
We at Laner Electric are currently evaluating DesignBais, which is what caused me to stumble across your blog in my research. Good Job!
An issue that is tangential to THIS blog topic: Have you found any way to make an iframe to render on the page WITHOUT the bounding box? I’ve looked into this a bit (when trying to insert a PICK generated html snippet – specifically a table of reference information) and couldn’t find a way to turn off the visual bounding box.
On second thought, this might NOT be an issue since we can use the technique you demonstrated for displaying "This came from js.html!" to embend the HTML for the table.
Again – Thanks!! — Steve
Tony Gravagno
11|Aug|2006 2Hi Steve – welcome to Neblog, and thanks for your comment and question!!
Check the frameborder=0 attribute of the <iframe> tag in the first example. I intentionally removed the border from the first example and left it in the second. If you’re doing a table then you can similarly remove borders or change their width. You can also change background colors to try to get a uniform look across the page, and eliminate a coloring difference which might be a visual clue that an iframe is present.
sjdorst
11|Aug|2006 3Tony – Kewl – Thanks! Frankly, I was just struggling to USE it to imbed a .htm file and never got around to looking at the formatting options.
One thing I DID find is that for iframes to work correctly from ie 6, then the url has to be from the same site as the page that embeds it. So if I want to programmatically generate html on the fly for imbedding using an iframe, I have to write it to a file that is within the url tree. Will probably somehow attach a network drive (which is actually a samba share) as a directory somewhere UNDER the root of the website running on WS2k3.
Of course, the inability to have a url from another site COULD be just an artificate of my own IE6 security settings, but since I never tried to look deeper, I just may not have found the solution to THAT problem.
–Steve
symeonb
23|Aug|2006 4Hi Steve – yes the problem you are having wioth iframes from another site will be due to your ie6 security settings.The most common error is if a web page from one zone has an iframe from another then it will give you an error message. e.g. if your designbais site is internet and your iframe is coming from your trusted sites. Make sure both sites are in the same zone.If there are still problems then there are a plethora of security settings that you may need to take a look at.Having said that, as you say above, the samba share and IIS virtual direcotry work well anyway.rgdsSymeon.
Leave a reply
You must be logged in to post a comment.
Search
Tony on Twitter...
Awesome! Gotta get me one tomorrow! http://t.co/xbpGrGNF INTRODUCING THE WORLD'S FIRST HOME MINI-NUCLEAR GENERATOR from @TigerDirect 2 months ago
Improve your OO coding with refactoring. Just take an hour or so to click through these tips: http://t.co/AghAGEbT 2 months ago
Fascinating blog/discussion on (C#) Enumeration classes to replace Enums, and related pros/cons: http://t.co/O2F5vh3M 2 months ago
@dwolt on snupnow: 1) create effective About page: what is it? 2) (advice given to me) get paying clients first, investors follow. 2 months ago
Archives by Tag
.NET AccuTerm AnzioWin API array avatar BASIC blog BlueFinity Caché CDP charts community correlative D3 dictionary distributed processing e-mail environment Excel Facebook file structure forum FOSS frames Google GPS graphs gravatar GUI images import/export item-id Java jBASE keys lists marketing memory mobile multivalues mv.NET mvBase MVSP mySQL NebulaXChange NebulaXLite NebulaXPlus OpenInsight OpenOffice Open Source Oracle PBX POS Postgres QM QMClient RDBMS relational SaaS SAPI savelist scanners select shell shutdown signature SMS SOA spam Spectrum speech SQL Server TAPI telephony tutorial Twilio U2 U2.NET UniObjects video Visual Studio voice Web Services wordpressCategories
Blogs
Forums
Sites
This Blog