.hta + Php?

Hello,

I am sure I will look ridiculous before most of you, but since ridicule hasn’t killed anyone yet, I go ahead: does anyone know how to integrate Micro$oft HTML Applications (HTA) with PHP?

:smiley:

what in god’s name is a microsoft html application? I clicked your link, didn’t take me anymore…

– Eric

HTA’s are a client side thing - all they are when it comes down to it are little bits of javascript in a file that is linked in to the HTML document using a CSS rule (which kind of makes a mockery of CSS being used to define the style of the document but I think we can put it down to another dirty MS hack ;))

Anything client side can be integrated with PHP. Just write a PHP script to output the HTML to include the hta - you can even write a PHP script to generate the hta file that gets included. PHP can be used to generate anything you want to send to the client - PHP doesn’t care what it’s outputting (HTML, XHTML, XML, JavaScript, CSS) and the browser doesn’t care if the incoming HTML/XHTML/XML/JavaScript/CSS was originally a file on a web server or has been generated by a server side scripting language such as PHP.

Originally posted by Zaire
what in god’s name is a microsoft html application? I clicked your link, didn’t take me anymore…-- Eric
HTAs are pretty clever. Essentially it’s a small piece of self-contained javascript that can be attached to an HTML element using CSS. This lets you define a library of “behaviours” for elements (such as “glow yellow when the user clicks on you”) and then apply them quickly and simply to elements using CSS. Unforunately it is completely non standard and there’s no way it will be adopted as a standard by the w3 because it breaks the whole idea of CSS being about presentation.

The best demo I’ve ever seen of HTAs s this one: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndude/html/dude07232001.asp

Wow that is really cool…

That’s IE only, correct? wow that’s neat…

Mozilla (and through it NS6) has an equivalent technology called XBL: http://www.mozilla.org/projects/xbl/xbl.html

From the tiny amount of info on microsoft’s site regarding hta’a, I gather that they bypass the browser and therefore apache wich is configured to ask php to parse .php files. I think this is the case because modifying httpd.conf to get apache to call php to parse files with the .hta extention did not behave as I expected. My php echo statements were not displayed in the html application’s window. PHPUI is a so-called PHP user interface toolkit for html applications. They seem to only be good for processing forms as the demo does only this. My interest is creating database integrated hta’s for the time being. This is new territory for me, as I am used to scripting php and html/dhtml for ‘web applications’. The dynamic is a known one involving interacting with a web server and not the Microsoft HTML Application Host that runs/interprits the hta’s. If anyone has any better resources, I’d love to get at them too. Thanks

Wrong. You are describing HTCs (HTML Component)

A HTA is an entire application writting in HTML+JS.