2008-06-24 [Revision #60, Version 0.6.0]
New Community Forums available at http://forums.ext.net
 

Coolite Forums

Welcome Guest ( Login | Register )
 
2008-06-24 [Revision #60, Version 0.6.0]
Subscribe
Last Login: 7/8/2010 1:50:34 AM
Posts: 4,722,
Posted 6/24/2008 1:21:40 AM

Group: Core Development Team
  1. Added 0.5.3 tag to SVN.
  2. Changed Build# to 0.6.0.
  3. Updated Copyright and date stamps.
  4. Added WindowUnload Listener to <ext:ScriptManager>.

    The following sample demonstrates setting the WindowUnload Listener which checks to see if either "Tab1" or "Tab3" is active before allowing the browser window to close or refresh. If "Tab2" is the activeTab, then the user will not be prompt to confirm.

    Example

    <ext:ScriptManager ID="ScriptManager1" runat="server">
        <Listeners>
            <WindowUnload Handler="
                var id = {TabPanel1}.getActiveTab().id;
                return (id == 'Tab1' || id == 'Tab3');
            " />
        </Listeners>
    </ext:ScriptManager>

    <ext:TabPanel ID="TabPanel1" runat="server" ActiveTab="0" Height="300">
        <Tabs>
            <ext:Tab ID="Tab1" runat="server" Title="Tab 1" Html="Tab 1" />
            <ext:Tab ID="Tab2" runat="server" Title="Tab 2" Html="Tab 2" />
            <ext:Tab ID="Tab3" runat="server" Title="Tab 3" Html="Tab 3" />
        </Tabs>
    </ext:TabPanel>


    Return 'true' to prompt the message, or 'false' to cancel the unload.

    The WindowUnload Listener is not native to Ext. We've added only as a convenience wrapper.
  5. Added WindowUnloadMsg Property to ScriptManager. The WindowUnloadMsg property is used as the extra text message to prompt to the user only when the <WindowUnload> Listener is set.

    The following sample will prompt the user before they refresh or close the browser window.

    Example

    <ext:ScriptManager 
        ID="ScriptManager1"
        runat="server"
        WindowUnloadMsg="Your data will not be saved!">
        <Listeners>
            <WindowUnload Handler="return true;" />
        </Listeners>
    </ext:ScriptManager>

--
Geoffrey McGill
Coolite Inc.
Development Team
Skype : geoffrey.mcgill
Forum Guidelines | Coolite Examples | Coolite API Docs | ExtJS API Docs | Twitter
« Prev Topic | Next Topic »
Reading This Topic
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.
All times are GMT -5:00, Time now is 8:34pm