Modular HTML in Adobe AIR? Is It Possible?

Posted by Greg Bulmash on Stack Overflow See other posts from Stack Overflow or by Greg Bulmash
Published on 2010-05-18T07:35:34Z Indexed on 2010/05/18 7:40 UTC
Read the original article Hit count: 230

When I write HTML with a PHP backend, I usually have a single header file and a single footer file with some PHP variables in them. The base skeleton for every page calls the header, contains the body content, and then calls the footer. That way, if I want to make changes to the header sitewide, I change one file.

I'm working on developing the UI in my first Adobe AIR app and I'm wondering if there's some way to include such files in an HTML based page template there.

Obviously, with the file read/write abilities in AIR, I can write a Javascript routine to pull data from a header file, parse it, and inject it into a placeholder. It just seems like such a kludge. I'm thinking there's gotta be some simple way to import a block of HTML into a page without an iFrame or complex post-processor. Something like a PHP include statement or perhaps the old Server Side Includes.

Any methods you guys can recommend?

© Stack Overflow or respective owner

Related posts about adobe

Related posts about adobe-air