Results 1 to 3 of 3

Thread: form.submit is not a function [Break on this error] form.submit();

  1. #1
    Sencha User
    Join Date
    Nov 2009
    Location
    Reading, UK
    Posts
    144
    Vote Rating
    6
      0  

    Cool form.submit is not a function [Break on this error] form.submit();

    Hi i am having a problem and working 2 day on it and i am little frustrated

    Code:
     this.SpremiChgNews.on('click', this.SpremiChgNewsPR, this);
      
     
    SpremiChgNewsPR: function (){
          
         this.FormChgNews.getForm().submit(
                    {
                        url: 'NovostiDB.php',params: {  task: "PROMJENA_PODATAKA",id:slekcijaID,idpromjene:slekcijaDOC
                  
                  
                },waitMsg: 'Uploading your document...',
                      
                        failure: function(form, action){
                          alert('Something went wrong...');
                        } 
                    });
        }
    i think it ok but i don know why .

    Here is my long code from designer
    Code:
    {
        xtype: 'window',
        title: 'Promjena Novosti',
        width: 876,
        layout: 'form',
        autoScroll: true,
        itemId: 'NovostiCHG',
        id: 'NovostiCHG',
        items: [
            {
                xtype: 'form',
                padding: 10,
                itemId: 'FormChgNews',
                autoShow: true,
                fileUpload: true,
                formId: 'FormChgNews',
                autoScroll: true,
                paramsAsHash: true,
                baseParams: 'PROMJENA_IZBORNIKA_PODATAK',
                width: 861,
                monitorValid: true,
                method: 'POST',
                maskDisabled: false,
                url: 'NovostiDB.php',
                ref: 'FormChgNews',
                id: 'FormChgNews',
                items: [
                    {
                        xtype: 'textfield',
                        fieldLabel: 'Naziv Hrvatski',
                        anchor: '100%',
                        itemId: 'NazivHR',
                        ref: '../NazivHR',
                        id: 'NazivHR'
                    },
                    {
                        xtype: 'textfield',
                        fieldLabel: 'Naziv Engleski',
                        anchor: '100%',
                        itemId: 'NazivEN',
                        ref: '../NazivEN',
                        id: 'NazivEN'
                    },
                    {
                        xtype: 'hidden',
                        fieldLabel: 'Upload slike',
                        anchor: '100%',
                        inputType: 'file',
                        autoWidth: true,
                        labelStyle: '',
                        itemId: 'FileUpload',
                        ref: '../FileUpload',
                        id: 'FileUpload'
                    },
                    {
                        xtype: 'box',
                        tpl: '',
                        height: 170,
                        itemId: 'SlikaPrikaz',
                        html: '<img id="pic"  src=_upload/_news/"\' + Ext.BLANK_IMAGE_URL + \'"\n             class="img-contact" style="margin:10px" height="150"  />',
                        width: 812,
                        ref: '../SlikaPrikaz',
                        id: 'SlikaPrikaz'
                    },
                    {
                        xtype: 'htmleditor',
                        anchor: '100%',
                        height: 150,
                        fieldLabel: 'Tekst mali hrvatski',
                        itemId: 'TextHR',
                        ref: '../TextHR',
                        id: 'TextHR'
                    },
                    {
                        xtype: 'htmleditor',
                        anchor: '100%',
                        height: 150,
                        fieldLabel: 'Tekst mali Engleski',
                        itemId: 'TextEN',
                        ref: '../TextEN',
                        id: 'TextEN'
                    },
                    {
                        xtype: 'radio',
                        fieldLabel: 'Odabir veze',
                        boxLabel: 'Link',
                        anchor: '100%',
                        itemId: 'LinkOdabir',
                        ref: '../LinkOdabir',
                        id: 'LinkOdabir'
                    },
                    {
                        xtype: 'radio',
                        boxLabel: 'HTML',
                        anchor: '100%',
                        itemId: 'HTMLOdabir',
                        ref: '../HTMLOdabir',
                        id: 'HTMLOdabir'
                    },
                    {
                        xtype: 'fieldset',
                        title: 'Link upis',
                        style: 'margin-top:20px;',
                        hidden: true,
                        itemId: 'LinkSelect',
                        ref: '../LinkSelect',
                        id: 'LinkSelect',
                        items: [
                            {
                                xtype: 'textfield',
                                fieldLabel: 'Link Hrvatski',
                                anchor: '100%',
                                itemId: 'LinkHR',
                                autoShow: true,
                                ref: '../../LinkHR',
                                id: 'LinkHR'
                            },
                            {
                                xtype: 'textfield',
                                fieldLabel: 'Link Engleski',
                                anchor: '100%',
                                itemId: 'LinkEN',
                                autoShow: true,
                                ref: '../../LinkEN',
                                id: 'LinkEN'
                            }
                        ]
                    },
                    {
                        xtype: 'fieldset',
                        title: 'HTML Upis',
                        hidden: true,
                        itemId: 'HTMLSelect',
                        ref: '../HTMLSelect',
                        id: 'HTMLSelect'
                    }
                ],
                bbar: {
                    xtype: 'toolbar',
                    ref: '../send',
                    items: [
                        {
                            xtype: 'button',
                            text: 'Snimite podatke',
                            itemId: 'SpremiChgNews',
                            iconAlign: 'right',
                            menuAlign: 'tr-br?',
                            type: 'submit',
                            autoShow: true,
                            ref: '../../SpremiChgNews',
                            id: 'SpremiChgNews'
                        }
                    ]
                }
            }
        ]
    }

  2. #2
    Sencha User
    Join Date
    Mar 2010
    Posts
    41
    Vote Rating
    2
      0  

    Default

    Is your scope correct? Try breaking "this.FormChgNews.getForm().submit" down. e.g
    Code:
    var a = this.FormChgNews;
    var b = a.getForm();
    b.submit(...

  3. #3
    Sencha User
    Join Date
    Nov 2009
    Location
    Reading, UK
    Posts
    144
    Vote Rating
    6
      0  

    Default

    i found out what is going on.... it was duplicated name ....uffff after two day working on it

Similar Threads

  1. form.submit doesn't call url in form submit action
    By webwolfi in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 26 Apr 2009, 10:16 AM
  2. Getting f.validate is not a function on form submit
    By Hemant Bob in forum Ext 2.x: Help & Discussion
    Replies: 9
    Last Post: 5 Jan 2009, 4:57 AM
  3. BrowseButton - form.submit is not a function
    By archmisha in forum Ext 2.x: Help & Discussion
    Replies: 9
    Last Post: 25 Oct 2008, 10:52 AM
  4. Help - FileUpload - form.submit is not a function
    By DTT_11-1983 in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 2 Jun 2008, 8:16 PM
  5. ID of submit within form masks submit function
    By aconran in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 19 Feb 2007, 12:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •