Jim DeFabia - Smart HTML Tricks

by Steve Parker

Published 1997-09-01    Printer-friendly version

HTML is not necessary to deploying applications with the Clarion Internet Extensions, but applications enhanced by embedded HTML will be better and more powerful.

What you can add to an application on the Web is limited only by your imagination. HTML can assist you in controlling the way in which different browser format your application's pages. For example, in Internet Explorer, buttons line up nice and neat. In Netscape, they are made as small as possible to fit the button's text. By padding the text with blanks in the appropriate HTML embeds you can, if you wish, make the buttons appear all the same size.

A knowledge of at least basic HTML is important when you add CWIC to your applications because HTML is the language that browsers understand - the only language they understand. And, HTML is originally based on a text-only model. Fortunately, CWIC handles most of the re-formatting required to view applications in a browser for you.

Among the gotchas that you can control easily are graphics. Jim noted that the TopSpeed logo on the TopSpeed site was a 40k file. After reducing the number of colors slightly, the file was reduced to 4k (Jim mentioned GifWizard as a very useful tool).

Similarly, you can control spacing using the "Single Pixel GIF Trick." Create a .GIF file that is (1) transparent and (2) only one pixel. When placed on a page where you can control its scaling, it will prevent other text and objects on the page from getting too close to one another.

Probably the easiest way to learn HTML, Jim noted, is to examine the source for pages you find attractive. All browsers have the ability to view source for a page.

Discussion proceeded to the next beta of CWIC and Jim, having a copy of the current state of the beta, displayed an application using it.

The big news is that Tabs (which formatted as buttons in beta 3) now format as Tabs. A number of the attendees had to check very carefully that they were viewing the app in a browser and not simply in Windows.

More big news from beta 4 is that CWIC will pick up your references to help files. While it cannot access an .Hlp file, it will look for a file with the same name as your help ID and an .HTM extension.

A defective projector marred Jim's presentation, and a great deal of time was lost while he was forced to reboot.

The presentation was well received and attendees had to be kicked out by the maintenance staff.

Printer-friendly version