[thelist] Difference between *.html and *.hta files

Keith cache at dowebs.com
Sun Dec 16 15:49:56 CST 2001


Hi Syed,

> > Hello Everybody,
> > What is the difference between *.html and *.hta files?
> > Can somebody tell me?

seems like you and I may be working on the same sort of task, you keep 
asking questions that are on paths I've recently traveled. My task is to 
produce chromeless Explorers so I can sculpt them to my liking. I just 
started building HTAs and they are cool/weird. 

An hta is simply an html doc with an hta:application tag in the head and an 
.hta extension. But, an hta is run from your local machine, as an exe, not 
from the server as an html doc. As a local app all security restrictions are 
gone, for example an hta can read/write to the hard drive. 

If the hta is accessed on a server the user is prompted to save it to their 
hard drive and the "page" then runs from that copy. The user can also 
download the hta, and other files such as images, in a zip, unzip anywhere, 
create a shortcut to the hta and place it on the desktop, in the start menu, 
etc. and click on the shortcut to launch it: a resident application running on 
the IE5+ engine in the IE appWorkspace. 

The main problem is that javascript is buggy. For example the javascript: 
protocol does not even exist. Hta seems to prefer VBscript modeled 
coding instead of the javascript model, such as <span style="cursor:hand" 
onclick=go()> instead of <a href="#" onclick=go()>. It's a windows exe so 
some cross-browser/cross-platform contructs of html are simply not 
supported or ill-supported. Also window resizing produces different 
dimensions.

We have a few "control panels" for webpage content management that we 
are converting to hta. But some of our control panels still need to be run as 
html from the server, but not "in" a browser. We launch those in "fullscreen" 
mode and then quickly reSize and moveTo to get a chromeless IE 
workspace. To launch in "fullscreen" mode:
window.open("some.htm","Win","fullscreen")

> http://msdn.microsoft.com/library/default.asp?url=/workshop/author/hta
> /overview/htaoverview.asp

Vic's link to MS's documentation is a MUST READ. It's one of the few 
documentations on that site that is really usefull and well thought out. 

 Happy coding (or whatever it is you're doing) Syed

keith





More information about the thelist mailing list