[CLOSED] filefield error after update sources from SVN 4702

Page 1 of 3 123 LastLast
  1. #1

    [CLOSED] filefield error after update sources from SVN 4702

    hi!

    After update sources from SVN 4702, I get this error when I try a upload file...

    Runtime Error in Microsoft JScript: Can not get property value 'dom': the object is null or undefined

    Click image for larger version. 

Name:	fileupload error after update from SVN - 4702.png 
Views:	86 
Size:	35.9 KB 
ID:	5321

    I made a sample!

    <%@ Page Language="vb"  %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" 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 runat="server">
        <title></title>
    
    <script type="text/javascript">
    
        Ext.onReady(function () {
    
            var viewPort = Ext.create("Ext.net.Viewport", {
                id: "ViewportConsole",
                renderTo: Ext.getBody(),
                layout: 'border',
                padding: '50 50'
            });
    
            //paneMain
            var paneMain = viewPort.add({
                itemId: 'mainPanel',
                layout: 'absolute',
                title: 'fileUpload',
                region: 'center',
                border: true,
                bodyPadding: 6
            });
    
            var formFileUpdate = paneMain.add({
                fileUpload: true,
                xtype: 'form',
                x: 5,
                y: 5,
                width: 400,
                height: 50,
                //hidden: true,
                layout: 'absolute',
                border: false,
                defaults: {
                    'labelAlign': 'top'
                }
            });
    
            //txtFileUpload
            formFileUpdate.add({
                itemId: 'txtFileUpload',
                xtype: 'filefield',
                x: 5,
                y: 5,
                width: 390,
                emptyText: 'Select a file',
                fieldLabel: 'File name',
                buttonText: 'Select a file'
                //            buttonConfig: {
                //                iconCls: 'upload_16'
                //            }
            });
    
            paneMain.add({
                xtype: 'button',
                text: 'send',
                x: 10,
                y: 80,
                listeners: {
                    click: {
                        fn: function (item) {
                            paneMain.upLoadFile();
                        }
                    }
                }
            })
    
            paneMain.upLoadFile = function (data) {
                formFileUpdate.submit({
                    url: '/testfile2.aspx',
                    params: { ID: 0 }, //here, I set the code of image in database, if is edit image.
                    waitMsg: 'Uploading... Please wait...',
                    success: function (fp, o) {
                        Ext.Msg.alert('Success', o.result.msg);
                    },
                    failure: function (form, action) {
                        alert('failure');
                        switch (action.failureType) {
                            case Ext.form.Action.CLIENT_INVALID:
                                Ext.Msg.alert('Failure', 'Form fields may not be submitted with invalid values');
                                break;
                            case Ext.form.Action.CONNECT_FAILURE:
                                Ext.Msg.alert('Failure', 'Ajax communication failed');
                                break;
                            case Ext.form.Action.SERVER_INVALID:
                                Ext.Msg.alert('Failure', action.result.msg);
                                break;
                            default:
                                Ext.Msg.alert('Failure', action.result.msg);
                                break;
                        }
                    }
                });
            }
    
        });
    
    </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        </form>
    </body>
    </html>
    Last edited by Daniil; Jan 29, 2013 at 3:01 PM. Reason: [CLOSED]
  2. #2
    Hi @supera,

    Thank you for the report.

    How does the "testfile2.aspx" page look?
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @supera,

    Thank you for the report.

    How does the "testfile2.aspx" page look?
    Oops! sorry!

    Follow!

    <%@ Page Language="C#" %>
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <script runat="server">
            protected void Page_Load(object sender, EventArgs e) {
                string s = "<html><body><textarea>{0}</textarea></body></html>";
                this.Response.Clear();
                this.Response.ContentType = "text/html";
                this.Response.Write(string.Format(s, Ext.Net.JSON.Serialize(new {
                    success = true, msg = "All OK"
                })));
                this.Response.End();
            }
        </script>
        <html xmlns="http://www.w3.org/1999/xhtml">
            
            <head id="Head1" runat="server">
                <title></title>
            </head>
            
            <body>
                <form id="form1" runat="server">
                    <div></div>
                </form>
            </body>
        
        </html>
  4. #4
    I cannot reproduce the issue
    Tested under IE9, FF 17 and Chrome 23. In all browsers I see 'All OK' message
  5. #5
    Quote Originally Posted by Vladimir View Post
    I cannot reproduce the issue
    Tested under IE9, FF 17 and Chrome 23. In all browsers I see 'All OK' message
    For me, still occurs error!

    Any tip?

    IE9 9.0.8112.16421
    FFox 17.0.1
    Chrome 23.0.1271.97 m

    I'm using VS2010

    Click image for larger version. 

Name:	fileupload error after update from SVN - 4702 2.png 
Views:	86 
Size:	97.4 KB 
ID:	5322
  6. #6
    It seems that you use old code because latest code has no such code
    this.fileInputEl.dom.value
    now the following code is used in SVN
    this.button.fileInputEl.dom.value
    just check what assembly do you use

    What SVN location do you use?
  7. #7
    Hi Vladimir!

    Thanks for your help!

    I update from SVN from this uri: http://svn.ext.net/premium/branches/2.1
  8. #8
    Branch 2.1 is not under development now. It should not be used anymore
    Trunk is under development now, but please note that current ExtJS version in trunk is 4.2 beta

    Another option, update from 'branches/2', it is public 2.1.1 release, ExtJS version is 4.1.1
  9. #9
    Hi Vladimir!

    I set the SVN url to /trunk

    Works very fine!

    Thanks a lot.
  10. #10
Page 1 of 3 123 LastLast

Similar Threads

  1. [CLOSED] Error after update from SVN
    By supera in forum 2.x Legacy Premium Help
    Replies: 12
    Last Post: Dec 31, 2012, 1:10 PM
  2. [CLOSED] Error After Update From SVN
    By dev in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 30, 2010, 1:56 PM
  3. Replies: 0
    Last Post: Jan 19, 2010, 10:24 AM
  4. Replies: 7
    Last Post: Dec 18, 2008, 12:09 AM
  5. [CLOSED] Error after update
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Nov 15, 2008, 4:54 PM

Posting Permissions