1 Reply Latest reply on Jun 12, 2008 10:05 PM by anirudhs

    Template/includes in air

      I am creating an AIR app and it is a basic html web page. I just want to build a few pages and send it to the someone as a trial.

      I usually use php or coldfusion to include the header or footer but as it is a plain old html file I cannot do this.

      Is there another way to create bits of my template I even tried

      <!--#include virtual="myfile.html" -->

      but this doesn't work. I suppose that leaves javasript or ajax?

      Any suggestions welcome.
        • 1. Re: Template/includes in air
          anirudhs Level 2

          There's no way to include bits of html in an AIR app. Using ajax to embed the html content within the application security sandbox is only possible while the content is loading.

          Once content is loaded, calls like eval(), document.write(), changing innerHTML, etc. do not work if the page is in the application sandbox (i.e, has access to file system, desktop APIs). These will work if you put the HTML page in an iframe though you'd need to bridge with content in the app sandbox for AIR APIs.

          Check out http://livedocs.adobe.com/air/1/devappshtml/security_4.html#1091782 for more info.