|
December 8, 1999 HTML Applications (HTAs) Tips: December 1999
Yehuda Shiran, Ph.D.
|
|
HTML Applications (HTAs) behave like any other applications on your computer, whether they are written in C++, Visual Basic, or J++. HTAs are like a dream come true for programmers who want the power of Internet Explorer without its strict security model and user interface. Now you can create browser-dependent applications that display themselves to your users as a plain window, without any resemblance to Internet Explorer's window. Your application needs to define the user interface, all by itself. For authors of browser-based Applications, you may find HTAs attractive as they hide the fact that they were written in HTML, DHTML, and JavaScript. For those of you that haven't tried yet writing applications for the Web, HTAs may be the turning point, at they are easier to write than C++ or Java applications. Programmers that write applications for the PC may consider writing them as HTAs now. You get the power of the DHTML & JavaScript languages and avoid the security shortcomings of Internet Explorer. An HTA file looks exactly like an HTML file. The only thing that distinguishes it as an HTA file is its file extension: hta instead of html or htm. Here is the simplest HTA application:
This is not a mistake. Both Internet Explorer and Netscape Navigator do not require the
Notice that the only way to close the application above is to click the x button at the window's top right corner. Normally, you would want to provide a more elegant exit from your application. Let's enhance the example above and add an exit button. Let's also be more formal and add the missing
Now launch the ATA and open this application when asked by the browser. Examine the application window. Notice that its title is no longer the HTA file name, but rather the Column39, HTML Applications describes in more details how to create and install HTML Applications.
People who read this tip also read these tips: Look for similar tips by subject: |