1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    21
    Vote Rating
    0
    Bouki is on a distinguished road

      0  

    Question Dynamically load content inside a window

    Dynamically load content inside a window


    Hi

    Is there a way to load dynamically content inside a window created with Ext.air.NativeWindow

    For instance, my main window has 2 buttons.

    I'd like that when you click on button 1, inside the window (eg : inside <div id = "content"></div>) page1.html is loaded
    the same when you click on button 2, inside the window page2.html is loaded

    Both of these pages are part of my application and are in the same directory of the main window

    I tryed to achieve that by using Ext.Ajax.request but this doesn't works because of sandbox limitations, the html is loaded but css and js aren't

    I also tryed to look at air.HTMLLoader but I couldn't find a way to place new content inside a particular div, however this loads successfully css and js

    Finally the only working way I have found is to use an iframe, but I'm looking for a better way to do that if it's possible.

    Thanks for any help

  2. #2
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    20
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    You can open the file into an air.FileStream and read the content of the file. Then update the innerHTML of your div with the available content.
    Programming today is a race between software engineers striving to build bigger and better Ń–diot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR

Similar Threads

  1. Dynamically load content in TabPanel with single call
    By Maxvader in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 14 Apr 2009, 7:38 AM
  2. Load the content of the tab dynamically
    By Jena in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 30 Sep 2008, 10:22 PM
  3. style is lost when dynamically load content into a panel
    By ajaxE in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 15 Feb 2008, 4:34 PM
  4. [Solved] Dynamically Load Content Into Dialog
    By cluettr in forum Ext 1.x: Help & Discussion
    Replies: 10
    Last Post: 31 Jul 2007, 10:43 AM

Thread Participants: 1