Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hta IE application

Status
Not open for further replies.

rhowes

IS-IT--Management
Jun 6, 2001
140
ZA
Hi

I need to remove the titlebar and borders if a browser window in IE. I see it's possible with an HTA (IE application) but I need to use extension .hta (instead of .php) and this would mean my PHP would not run.

Anyone else tried this and found a solution?

Cheers
Richard
 
The titlebar and the border? that isn't possible. If you want to configure anything inside the windows here is the command, but you have to open a new one. This code is JS. You can't do it in PHP.

window.open('urll','name','height=450,width=450,menubar=no,scrollbars=yes,toolbar=no,location=no,status=no');

Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
It is possible with an HTA, as long as the user accepts the security risk of running it. Usually, the browser pops up a confirmation dialog, prompting the user to accept. Or, if they have configured IE for a high security level, they might be prevented from running the HTA at all.

Of course you know that HTA is client-side code and PHP is server-side code, but as long as PHP outputs valid Javascript/VBscript and HTML, then it is no problem.

Even though your webserver normally runs PHP files with the .php extension, it is possible to have any other extension parsed for PHP code. In the Apache webserver, you can even do it on a per-directory basis. In IIS, you can simply add another application mapping to script .hta files through the PHP executable. -------------------

Current reading --
 
We are developing an application for a closed community (reservations system for game reserves in South Africa) and we have control over the user browser (and version) which will be IE.

An HTA would give us more control over our environment.

Are there any other concerns anyone has about developing an HTA?
 
Yes, and HTA would give you more control over your environment, but you would be surprised at how much control you can get without loading an HTA. For example working with DHTML behavior files (usually .htc files, but the extension can be anything):

Code:
<style>
.my_class{
   behavior:url(my_behavior.htc)
}
.my_dynamic_class{
   behavior:url(my_dynamic_behavior.php)
}
And, using the extended DOM control that IE gives you, it is possible, for example, to create a DHTML layer that expands beyond the bounds of the current window, as well as establish control over any single HTML element in the page.

There are thinghs HTA's can do that regular DHTML/JScript can't. These usually involve client-side control, such as accessing the user's filesystem, or connecting to client-side data sources, or even accessing and modifying the Windows registry. Because of this, the power that users must grant an HTA tend to scare me. I rarely see the need for a web-based application to do this sort of thing, and I recommend that you stear clear of this. If you do want to use HTA's, I recommend that you only use them in combination with encypted SSL web pages. -------------------

Current reading --
 
Thanks rycamor, great information and advice. I wonder if you can point me to more information regarding the extended DOM of IE and the capabilities.

Also, could you possibly expand on the use of behavious files and the style code you posted above.

Finally, I am very curious about the ability to create a layer that goes beyond the bounds of the current window. Could you please explain (how is it done and what can you do with it?).

Thanks again.
Regards

Richard
 
Spend some time at and if you search enough, you will find all the answers. It will take some digging, though, through the complicated menu system on the left.

IE 5 was supposed to be theoretically compliant with the W3C Document Object Model ( which is also pursued by Netscape/mozilla, and Opera, among others, but the implementation is a little different, and Microsoft soon started adding proprietary extensions to the browser. Some of these extensions are quite cool, though.

There are quite a few other places where you can get information about IE's capability:

-------------------

Current reading --
 
Thanks very much, the resources are great and I have found some good stuff at msdn.microsoft.com/ie already.

Your time is much appreciated.

Regards,
Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top