[CLOSED] Dynamically Add Tab without postback

  1. #1

    [CLOSED] Dynamically Add Tab without postback

    Hello:

    Could anyone provide an example for dynamically adding a tab to a tab panel when clicking on a navigation link. I would like to be able to do this without a post back.

    I am using v0.5.

    thanks,

    Rob
  2. #2

    RE: [CLOSED] Dynamically Add Tab without postback

    Hi Rob,

    You can create and add a new Tab to a TabPanel with a bit of JavaScript.

    Example

    <script type="text/javascript">
        var addTab = function() {
            var tab = new Ext.Panel({
                        title: "New Tab",
                        autoLoad: "../AutoLoadData/Simple.aspx"
                      });
                      
            TabPanel1.add(tab);
            TabPanel1.setActiveTab(tab);
        }
    </script>
    I also created a full sample demonstrating a couple different options and uploaded to the sandbox. See http://sandbox.ext.net/TabPanel/AddTab.aspx

    Hope this helps.
    Geoffrey McGill
    Founder & CEO
  3. #3

    RE: [CLOSED] Dynamically Add Tab without postback

    thank you Geoff!

    -Rob
  4. #4

    RE: [CLOSED] Dynamically Add Tab without postback

    Geoff

    You may already know that the sandbox examples do not load. can you let me know when they will be accessible.
    thank you
    idriss

  5. #5

    RE: [CLOSED] Dynamically Add Tab without postback

    Hi idrissb,

    the example on sandbox is working now

    Vladimir Shcheglov
    Sr. Developer

Similar Threads

  1. Replies: 0
    Last Post: Mar 27, 2012, 10:01 AM
  2. Replies: 2
    Last Post: Nov 23, 2011, 1:02 AM
  3. Replies: 1
    Last Post: Jul 15, 2011, 12:40 AM
  4. Replies: 4
    Last Post: Jan 31, 2011, 12:39 AM
  5. [CLOSED] [1.0] DirectEvents and Postback in IE
    By HOWARDJ in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 29, 2010, 12:02 AM

Posting Permissions