[CLOSED] DocumentReady Fn delegate isn't called

  1. #1

    [CLOSED] DocumentReady Fn delegate isn't called

    Hi,

    Please advise what's missing in my setup. The DocumentReady Fn delegate doesn't get called. The handler, however, is perfectly fine. Also, if you could tell me the signature of the Fn delegate or provide the documentation link, that would be great.

    <%@ Page Language="C#" %>
    
    <%@ Register TagPrefix="ext" Namespace="Ext.Net" Assembly="Ext.Net" %>
    
    <!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 runat="server">
        <title></title>
        <ext:ResourcePlaceHolder ID="ResourcePlaceHolder1" runat="server" Mode="Script" />
        <ext:ResourcePlaceHolder ID="ResourcePlaceHolder2" runat="server" Mode="Style" />
        <script type="text/javascript">
            var onDocumentReady = function () {
                alert(1);
            };
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server">
                <Listeners>
                    <DocumentReady Fn="onDocumentReady" />
                </Listeners>
            </ext:ResourceManager>
            <ext:Viewport runat="server">
                <Items>
                    <ext:Button runat="server" Text="Test">
                    </ext:Button>
                </Items>
            </ext:Viewport>
        </form>
    </body>
    </html>
    Last edited by Daniil; May 21, 2013 at 3:12 PM. Reason: [CLOSED]
  2. #2
    Hi,

    replace

       <DocumentReady Fn="onDocumentReady" />
    with:

       <DocumentReady Handler="onDocumentReady();" />
    it should work..

    Bye,
    Stefano
  3. #3
    Hi everybody,

    Yes, it is a bug in v1 with Fn, please use a Handler instead as Stefano suggested.

    It is fixed in v2.

    Stefano, thank you for your attention to this thread!
  4. #4
    Thank you guys! I've been using the Handler forever but wasn't aware of the Fn bug when I tried to make use of it to obtain the handle on the event arguments. Please mark this as closed.

Similar Threads

  1. [CLOSED] Ext.onReady and Resource Manager DocumentReady
    By Kev in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 27, 2013, 3:54 AM
  2. [CLOSED] History control is unavailable in DocumentReady handler
    By vadym.f in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Apr 30, 2013, 4:39 PM
  3. Replies: 2
    Last Post: Oct 27, 2011, 12:35 PM
  4. How to expand the DropDownField on DocumentReady?
    By phinoppix in forum 1.x Help
    Replies: 1
    Last Post: Aug 02, 2011, 3:35 PM
  5. DocumentReady Listener not firing
    By Tbaseflug in forum 1.x Help
    Replies: 1
    Last Post: Aug 28, 2009, 2:16 PM

Tags for this Thread

Posting Permissions