1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    4
    Vote Rating
    0
    rudy is on a distinguished road

      0  

    Default tabpanel - how change content

    tabpanel - how change content


    Hi, I dinamycally created some tabpanel using the example and the content of each panel is coming from dinamic page.
    Now I would like to change the content of the same tab clicking on an item in it.

    ex.
    the tab1 content is coming from test.asp which is a recordset list exposed in a table.
    I would like to click on one record and change the tab1 content to 'test2.asp?id=1'
    how can I make this?

    thankyou in advance fon any answer

    Rudy

  2. #2
    Ext User
    Join Date
    Mar 2007
    Posts
    4
    Vote Rating
    0
    rudy is on a distinguished road

      0  

    Default


    I forgot that my tabpanel look like that, supposing I want to replace tab2 content with
    test2.asp?id=1 clicking on an item of categorie.asp, how can i do?
    ________________________________________
    var TabsExample = {
    init : function(){
    var jtabs = new YAHOO.ext.TabPanel('jtabs');

    var tab0 = jtabs.addTab('campi', "campi");
    tab0.setUrl('campi.asp', null, true);

    var tab1 = jtabs.addTab('carpenterie', "carpenterie");
    tab1.setUrl('carpenterie.asp', null, true);

    var tab2 = jtabs.addTab('categorie', "categorie");
    tab2.setUrl('categorie.asp', null, true);

    var tab3 = jtabs.addTab('categorie_campi', "categorie_campi");
    tab3.setUrl('categorie_campi.asp', null, true);

    var tab4 = jtabs.addTab('prodotti', "prodotti");
    tab4.setUrl('prodotti.asp', null, true);

    var tab5 = jtabs.addTab('sottocategorie', "sottocategorie");
    tab5.setUrl('sottocategorie.asp', null, true);

    var tab6 = jtabs.addTab('utenti', "utenti");
    tab6.setUrl('utenti.asp', null, true);

    }
    }
    YAHOO.ext.EventManager.onDocumentReady(TabsExample.init, TabsExample, true);

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    Refer to the doc http://www.yui-ext.com/deploy/yui-ex...PanelItem.html

    Call setUrl to update the new url, then call refresh to reload the tab.

  4. #4
    Ext User
    Join Date
    Mar 2007
    Posts
    4
    Vote Rating
    0
    rudy is on a distinguished road

      0  

    Default


    thankyou.
    How can I refer to tab2 member of jtabs?
    I've tried

    onClick="YAHOO.ext.TabPanel('jtabs').tab2.setUrl('categorie_n.asp');YAHOO.ext.TabPanel('jtabs').tab2.refresh()"

    but nothing happens

    Could someone help me?

  5. #5
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    I think you need to stop and learn some basic Javascript - the line of code you wrote means nothing. You declared a var called tab2, but you don't know how to use it.

    Buy a Javascript book or refer to the "Javascript newbies' thread for more references. I'm not trying to be harsh, but you can't expect to use a complex Javacript library if you don't understand basic Javascript.

  6. #6
    Ext User
    Join Date
    Mar 2007
    Posts
    4
    Vote Rating
    0
    rudy is on a distinguished road

      0  

    Default


    thankyou for your help.
    Sorry, I thought it was an Help forum ...
    I was hoping to get a more helpfull answer

  7. #7
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    It's a help forum for a fairly high level Javascript library, and you do not know the language.

    Try posting code that won't compile, on say a C++ help forum saying that you want to write a Windows GUI app, but you don't know C++.

  8. #8
    Ext Premium Member BernardChhun's Avatar
    Join Date
    Mar 2007
    Location
    Quebec, Canada
    Posts
    831
    Vote Rating
    2
    BernardChhun will become famous soon enough

      0  

    Default


    Sorry about that rudy but Animal and TryanDSL are right.

    You can't expect us to hold your hand while we are also doing our stuff. You have to know the basics and try things out by yourself too. I'd recommend you to read a whole lot on OO javascript as well.

    we are all in the same boat as we are all programmers right? And as programmers, we have to dig in and get dirty with such hassles as learning the framework we want to work with.

Similar Threads

  1. How to change a tabpanel title?
    By qiuyl in forum Community Discussion
    Replies: 3
    Last Post: 1 May 2011, 12:51 PM
  2. How to Dynamically change the content of a BorderLayout.
    By wq7278 in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 7 Mar 2007, 7:35 AM
  3. Splitbar: Change height according to content
    By Dextro in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 4 Dec 2006, 6:55 AM
  4. Stop a tab change with TabPanel
    By jonathanv in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 30 Nov 2006, 7:16 PM
  5. tabPanel.activate() with no change
    By rgraff in forum Ext 1.x: Bugs
    Replies: 1
    Last Post: 23 Oct 2006, 1:04 PM

Thread Participants: 3