dynamic window from another dynamic window

  1. #1

    dynamic window from another dynamic window

    hello im using this code to create and show dynamic windows on web desktop:

    <code>



    function createDynamicWindow(app, urls, descr, ids, vHeight, vWidth) {


    var desk = app.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: vWidth, height: vHeight, maximizable: true, minimizable: true, pageX: 30, pageY: 30, autoLoad: { url: urls, maskMsg: "Loading...", mode: "iframe", showMask: true, CenterOnLoad: "false"} });


    w.show();


    }

    </code>

    and code for button:

    <code>



    <ext:ToolbarButton ID="ToolbarButton2" runat="server" Text="some" Icon="ArrowDown">


    <Listeners>


    <Click Handler="createDynamicWindow(#{Desktop1}, 'first.aspx', 'first', 'first', 500, 900);" />


    </Listeners>


    </ext:ToolbarButton>
    </code>

    this code works perfectly, and lets say i have a button in this dynamically created window to create another window and this second window dont appear.
    how to launch dynamic window from another dynamically created ?
  2. #2

    RE: dynamic window from another dynamic window

    Hi ven

    Do you want to call a desktopwindow from the new dynamic window or do you want to call a normal window

    Richardt
  3. #3

    RE: dynamic window from another dynamic window

    hello

    i want to create another dynamic window using this java function
  4. #4

    RE: dynamic window from another dynamic window

    Hi ven

    Hope this helps

    Create another function called createDynamicWindowChild on your desktop.aspx here is the code. NB MyDesktop is the id of the <ext:Desktop id="MyDesktop"

    
    
    
    
    function createDynamicWindowChild(urls, descr, ids, ht, w, maxi) {
    
    
    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"
    
    
     
    
    
    }
    
    
    });
    
    
    w.show();
    
    
    }
    Then from the first.aspx call the createDynamicWindowChild in the desktop.aspx window.
    Here is the code

    
    
    
    
    parent.createDynamicWindowChild('second.aspx', 'second', 'second', 500, 900);
    hope this help

    Richardt
  5. #5

    RE: dynamic window from another dynamic window

    yes, this is what i lookin for

    thank you, best regards

    Patrick

Similar Threads

  1. Replies: 7
    Last Post: Feb 09, 2012, 11:17 AM
  2. Close dynamic window
    By Dominik in forum 1.x Help
    Replies: 0
    Last Post: May 04, 2010, 8:47 AM
  3. Dynamic window title
    By phillipl in forum 1.x Help
    Replies: 3
    Last Post: Dec 16, 2009, 6:03 AM
  4. Dynamic window event
    By Yannis in forum 1.x Help
    Replies: 2
    Last Post: Nov 04, 2009, 11:06 AM
  5. DesktopShortcut and Dynamic Window
    By sfvaleriano in forum 1.x Help
    Replies: 1
    Last Post: Sep 18, 2009, 4:56 AM

Posting Permissions