[EXAMPLE] How to create new windows

Page 2 of 2 FirstFirst 12
  1. #11

    RE: [EXAMPLE] How to create new windows

    i am trying to use the callback property of the window's autoload property/object.... because in ExtJs there is a callback property for the autoload... but its not working for me, please help
  2. #12

    RE: [EXAMPLE] How to create new windows

    Hi [WP]joju,

    Please start a new topic and provide a code sample demonstrating how you currently have the component configured.


    Geoffrey McGill
    Founder
  3. #13

    RE: [EXAMPLE] How to create new windows

    Thank you for your example, it s very usefull.

    I can create a windows from the desktop, works easy.

    I m stuck now to the next step, how to create a second "desktop" windows from the first one. If i use this code in the child windows, the new windows will be inside the first one.

    Is it possible to create a desktop window (not inside the child window but on the main desktop) with some code inside the child window?
  4. #14

    RE: [EXAMPLE] How to create new windows

    Hi Hugues

    Yes is is possible.

    Place the following code in your desktop aspx page. Replace MyDesktop.getDesktop(); with YourDesktopID.getDesktop();


    
    
    
    function createDynamicWindowChild(urls, descr, ids, ht, w, maxi) {
    
    
    if (ht == 0) {
    
    
    ht = screen.availHeight - 220;
    
    
    }
    
    
    var desk = MyDesktop.getDesktop();
    
    
    var windows = desk.getManager().getBy(function() { return true; });
    
    
    var i = 0;
    
    
    for (i = 0; i <= windows.length - 1; i++) {
    
    
    if (windows[i].id == ids) {
    
    
    windows[i].show();
    
    
    return
    
    
    }
    
    
    }
    
    
     
    
    
    
    
    
    var w = desk.createWindow({
    
    
    id: ids,
    
    
    title: descr,
    
    
    width: w,
    
    
    height: ht,
    
    
    maximizable: true,
    
    
    minimizable: true,
    
    
    pageX: 10,
    
    
    pageY: 10,
    
    
    autoscroll: false,
    
    
    autoLoad: {
    
    
    url: urls,
    
    
    maskMsg: "Loading...",
    
    
    mode: "iframe",
    
    
    showMask: true,
    
    
    CenterOnLoad: "false"
    
    
     
    
    
    }
    
    
    });
    
    
    if (maxi == "M") {
    
    
    w.maximize()
    
    
    }
    
    
    w.show();
    
    
    }

    Then in the child window, with javascript, to call the new window use the following code. If you put an M where the N is the window will be maximized

    
    
    
    parent.createDynamicWindowChild('Youraspx', 'Title', 'idofwindow', 500, 900, 'N');
    Hope this helps
  5. #15

    RE: [EXAMPLE] How to create new windows

    It's great and 3Q for sharing
  6. #16

    RE: [EXAMPLE] How to create new windows

    Hi,

    I'm building a prototipe in which there is a main page with a TabPanel like in the MVC demo (http://mvc.ext.net).

    Each new tab that opens is loading a MVC page.

    I wonder if I can open a window from the tab page at the application level (i.e. in the main page) to simulate a desktop-like application.

    I also tried to add a Desktop to my prototipe and open my main page in a Panel, but anyway I don't kwon how to open a new desktop windows from another desktop window.

    Does anyone would know how to solve this problem?

  7. #17

    RE: [EXAMPLE] How to create new windows

    Ok,

    I finally could open windows in my prototipe as in a MDI-like environment.

    Now, I only have problems to minimize windows. By the moment, I use Collapsable property...

  8. #18

    RE: [EXAMPLE] How to create new windows

    How can I pass icon in the 'config' object?


    geoffrey.mcgill (4/28/2009)If I may offer a few suggestions, your function could be simplified to the following.

    Example

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title></title>
        <script type="text/javascript">
            var newWindow = function (url, config) {
                new Ext.Window(Ext.apply({
                    renderTo: Ext.getBody(),
                    resizable: false,
                    title: "Teste",
                    height: 500,
                    width: 500,
                    frame: true,
                    autoLoad: {
                        maskMsg: "Carregando...",
                        showMask: true,
                        mode: "iframe",
                        url: url
                    }
                }, config)).show();
            }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ScriptManager runat="server" />
            
            <ext:Button ID="Button3" runat="server" Text="Teste" Icon="ServerGo">
                <Listeners>
                    <Click Handler="newWindow('teste.aspx', {title: 'Exemplo', height: 200, width: 200});" />
                </Listeners>
            </ext:Button>
        </form>
    </body>
    </html>
    By passing a 'config' object instead of named parameters when calling newWindow(), you get the flexibility of passing as many or little config options as you like. You only have to override certain properties and the others will be set to their default values.

    Hope this helps.
  9. #19

    RE: [EXAMPLE] How to create new windows


    Thanks for share .

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [CLOSED] IIS7 Windows 7 x Windows 2008
    By majunior in forum 1.x Legacy Premium Help
    Replies: 14
    Last Post: Nov 08, 2011, 6:56 PM
  2. [CLOSED] Create multiple windows..
    By mattwoberts in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 11, 2011, 12:11 PM
  3. [CLOSED] Desktop BUG: Modal windows can be minimized and you can interact with the other windows
    By juanpablo.belli@huddle.com.ar in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 31, 2009, 2:49 PM
  4. Replies: 1
    Last Post: Mar 17, 2009, 1:17 AM
  5. Replies: 1
    Last Post: Mar 29, 2008, 7:04 PM

Posting Permissions