Results 1 to 10 of 14

Thread: How to submit tabpanel items?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Dec 2010
    Location
    Toronto
    Posts
    62
    Vote Rating
    1
      0  

    Default How to submit tabpanel items?

    I have an tabpanel. when I click submit, how can I submit all items to the server like a form?

    panel = new Ext.TabPanel({...

    panel.get...submit...
    Please advise.

  2. #2
    Sencha User
    Join Date
    Jan 2011
    Posts
    549
    Vote Rating
    54
      0  

    Default

    I assume you have a formPanel inside each tab?

    If that is the case, then upon clicking submit, do the following:

    - get each form
    - loop through each form and get their values
    - combine these values into a param object
    - send this as your parameters on an AJAX call

  3. #3
    Sencha User
    Join Date
    Dec 2010
    Location
    Toronto
    Posts
    62
    Vote Rating
    1
      0  

    Default

    Thanks willigogs, I am looking for a way to submit tabPanel like form. If I create tabPanel like

    panel = new Ext.FormPanel({
    items: [
    {
    xtype: "tabpanel",
    activeTab: 0,
    .......
    panel.getForm().submit({ url: 'myData.aspx?action=' + action , success: success, failure: failure });
    It is working. But this way just working in my Firefox. IE and Chrome is not working.
    The reason maybe this tabpanel built in the other FormPanel. And the FormPanel build in a win form.
    If I create panel as FormPanel, the win form can not be pop up. Maybe I need fix how to make win form popup when I create panel as FormPanel.
    Anyway, the reason I change formPanel as TabPanel is that tabPanel can popup win form with FF,IE and chrome. FormPanel just can use at FF.

    Please advise.
    Many thanks,

  4. #4
    Sencha User
    Join Date
    Jan 2011
    Posts
    549
    Vote Rating
    54
      0  

    Default

    Quote Originally Posted by thomsonzh View Post
    The reason maybe this tabpanel built in the other FormPanel. And the FormPanel build in a win form.
    If I create panel as FormPanel, the win form can not be pop up. Maybe I need fix how to make win form popup when I create panel as FormPanel.
    Anyway, the reason I change formPanel as TabPanel is that tabPanel can popup win form with FF,IE and chrome. FormPanel just can use at FF.
    Sorry, but would you be able to clarify the above, as I'm not following

    The above code you supplied should work, therefore I can only assume you're doing something unorthodox?

  5. #5
    Sencha User
    Join Date
    Dec 2010
    Location
    Toronto
    Posts
    62
    Vote Rating
    1
      0  

    Default

    I got the error "Object doesn't support property or method 'onRemove' ", when I change tabPanel to FormPanel. This is IE pop up windows error,but firefox is OK.
    Any ideas?

  6. #6
    Sencha User
    Join Date
    Dec 2010
    Location
    Toronto
    Posts
    62
    Vote Rating
    1
      0  

    Default Answer about this issue

    I found the answer below.
    Its not a possible put FormPanel in TabPanel which be in another FormPanel.

  7. #7
    Sencha User
    Join Date
    Jan 2011
    Posts
    549
    Vote Rating
    54
      0  

    Default

    I didn't even realise you were trying to put a form inside another form

    This isn't supported even by startdard HTML form elements, regardless of whether you're attempting this within EXTJS

Posting Permissions

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