Open other ASPX pages in one Desktop windwo

  1. #1

    Open other ASPX pages in one Desktop windwo

    Hi eveyone,

    Is it possible to open other ASPX pages in one Desktop window? if it is, how can i do that?

    Your help appreciated in advance.

    thanks,
    Kamal
  2. #2

    RE: Open other ASPX pages in one Desktop windwo



    Hi Kamal,
    Thats for sure,
    check the Desktop example, there is a clientside javascript function that doing the same and opening external url inside desktopwindow (iframe mode)

    function createDynamicWindow (app) {
                var desk = app.getDesktop();
    
    
                var w = desk.createWindow({
                    title: "Web Browser",
                    width: 1000,
                    height: 600,
                    maximizable: true,
                    minimizable: true,
                    autoLoad: {
                        url: "http://ajaxian.com/archives/mad-cool-date-library/",
                        mode: "iframe",
                        showMask: true
                    }
                });
    
    
                w.center();
                w.show();
            }
    you can do the same and change url to the path of your aspx page
  3. #3

    RE: Open other ASPX pages in one Desktop windwo

    Hi Bassel,
    Thanks for your prompt reply. I tried the following code but it is not working. it throws an error message and does not create the window.
    On each ASPX page I have a DesktopWindow and would like to open them in my master page.
    I tried the following code and did not work. Do you know why? i am sure i am missing something!!
    
    
    
    <asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    
    
    <script type="text/javascript">
    
    
    function createW(app) {
    
    
    var desk = app.getDesktop();
    
    
    var windows = desk.getManager().getBy(function() { return true; });
    
    
    var title = 'Opened windows: ' + (windows.length + 1);
    
    
    var w = desk.createWindow({ title: title, width: 500, height: 500,
    
    
    maximizable: true, minimizable: true,
    
    
    autoLoad: { url: "C:\MallDB\Pages\Sampling\Default2.aspx",
    
    
    mode: "iframe", showMask: true}
    
    
    });
    
    
    w.center();
    
    
    w.show(); 
    
    
    } 
    
    
    </script> 
    
    
    <ext:Desktop ID="Desktop1" runat="server" Wallpaper="../../App_Themes/Theme/Images/bg/goldbg.jpg">
    
    
    <StartButton Text="Start" />
    
    
    <StartMenu Width="325" Height="300" ToolsWidth="125" Shadow="true">
    
    
    <ToolItems>
    
    
    <ext:MenuItem Text="Settings" Icon="Wrench">
    
    
    <Listeners>
    
    
    <Click Handler="Ext.Msg.alert('Message', 'Settings Clicked');" />
    
    
    </Listeners>
    
    
    </ext:MenuItem>
    
    
    <ext:MenuItem Text="Logout" Icon="Disconnect">
    
    
    <AjaxEvents>
    
    
    
    
    
    </AjaxEvents>
    
    
    </ext:MenuItem>
    
    
    </ToolItems>
    
    
    <Items>
    
    
    <ext:MenuItem ID="MenuItem1" runat="server" Text="All" Icon="Folder" HideOnClick="false">
    
    
    <Menu>
    
    
    <ext:Menu ID="Menu1" runat="server">
    
    
    <Items>
    
    
    <ext:MenuItem Text="Edit" Icon="Add">
    
    
    <Listeners>
    
    
    <Click Handler="createDynamicWindow(#{Desktop1});" />
    
    
    </Listeners>
    
    
    </ext:MenuItem>
    
    
    </Items>
    
    
    </ext:Menu>
    
    
    </Menu>
    
    
    </ext:MenuItem>
    
    
    <ext:MenuSeparator />
    
    
    </Items>
    
    
    </StartMenu>
    
    
    <Modules>
    
    
    <ext:DesktopModule ModuleID="DesktopModule1" AutoRun="false">
    
    
    <Launcher ID="Launcher1" runat="server" Text="Edit Data" Icon="Add" />
    
    
    </ext:DesktopModule>
    
    
    </Modules>
    
    
    </ext:Desktop>
    
    
    <ext:Window ID="Window1" runat="server" Collapsible="true" Icon="Application" Title="Title">
    
    
    <AutoLoad Url="MallDB\Pages\Sampling\Default2.aspx" ShowMask="true" Mode="IFrame"></AutoLoad>
    
    
    <Body>
    
    
    
    
    
    </Body>
    
    
    </ext:Window>
    
    
    </asp:Content>
    Thanks in advance.

    Kamal
  4. #4

    RE: Open other ASPX pages in one Desktop windwo

    Hi Kamal,

    you can't use local path to aspx page like you do in this line:

    autoLoad: { url: "C:\MallDB\Pages\Sampling\Default2.aspx"

    the path should be virtual path like or apsolute path.
    either relatively to the location of your current page or apsolute path that starts with
    http:// server name / ../default2.aspx

  5. #5

    RE: Open other ASPX pages in one Desktop windwo

    Thanks Bassel, Now I can display other pages inside my desktop. but I am facing another problem. my Default2.aspx page does not fit inside the page, I have to minimize it and then maximize it to fill the screen. Is there any automatic way which force the page to fit the window?

    thanks.
    Kamal
  6. #6

    RE: Open other ASPX pages in one Desktop windwo

    Hi Kamal,
    you better start checking all methods and properties in the API before you continue your project ;)

    the Desktop window has a method that you can call at the server side and client side:
    window.maximize();
  7. #7

    RE: Open other ASPX pages in one Desktop windwo

    thanks for your help. The problem was in the css file.
    Now i can open my pages in different desktop windows. Does it effect the memory if I open 5 or 6 pages in 5-6 desktop windows? Do i need to destroy them? If I need to destroy them, how I can do it?

    Thanks for your help,
    Kamal

Similar Threads

  1. Open other aspx pages in desktop window
    By Vaishali in forum 1.x Help
    Replies: 1
    Last Post: Jan 19, 2012, 12:20 PM
  2. as aspx pages loaded in tabs
    By jhohan25 in forum 1.x Help
    Replies: 2
    Last Post: Jun 02, 2011, 6:21 PM
  3. Replies: 4
    Last Post: Jun 09, 2010, 5:45 AM
  4. [CLOSED] Which control can I use without bordes to load aspx pages?
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Feb 01, 2010, 7:13 PM
  5. [CLOSED] Controls in ASPX pages when using Autoload
    By egodoy in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 29, 2009, 2:48 PM

Posting Permissions