Results 1 to 6 of 6

Thread: Ajax Accordion

  1. #1
    Ext User
    Join Date
    Jul 2007
    Location
    Calgary, AB
    Posts
    10

    Default Ajax Accordion

    I would like to know how to implement the code that was found in the live demo with the accordion that had Ajax loaded content.

    I'm trying to figure out how this was done but can't quite do it. Any help would be appreciated.

  2. #2
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664

    Default

    Quote Originally Posted by dillenger View Post
    I would like to know how to implement the code that was found in the live demo with the accordion that had Ajax loaded content.

    I'm trying to figure out how this was done but can't quite do it. Any help would be appreciated.
    This is code from demo page that does it:

    PHP Code:
        var ipanel9 = new Ext.ux.InfoPanel({
            
    title'9. Loaded by Ajax on expand'
            
    id'ipanel-9'
            
    url'panel-content.php'
            
    desktop'panels-content'
            
    resizabletrue
            
    draggabletrue
            
    useShadowtrue
            
    animatetrue
            
    autoCreatetrue
        
    }); 
    Server-side script panel-content.php delivers the content itself.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  3. #3

    Default

    I don't understand what kind of content must be created with panel-content.php
    I try different knid of html, but nothing seems to work.
    Can you provide an example please?
    thanks

  4. #4
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664

    Default

    panel-content.php:

    PHP Code:
    <?
    // $Id: panel-content.php 39 2007-06-15 13:13:41Z jozo $
    sleep(2);
    echo 
        '<div class="text-content">'
        . '<h3>'
        . 'Dynamically loaded content:'
        . '</h3>'
        . '<p>'
        . 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. '
        . 'Fusce pellentesque. Duis fermentum metus nec nisl. '
        . '</p>'
        . '</div>'
    ;
    ?>
    sleep(2) is just to show the loading indicator for 2 seconds. You don't need it in real app.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  5. #5
    Sencha Premium Member
    Join Date
    Jun 2007
    Posts
    216

    Default

    Is there a way to refresh the accordion? Like an event that re-gets the data?

    Also, is there a way to do sub-accordions?

  6. #6
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664

    Default

    Quote Originally Posted by end-user View Post
    Is there a way to refresh the accordion? Like an event that re-gets the data?
    Yes. InfoPanel is extension of ContentPanel, i.e. url, setUrl, update, params, loadOnce, etc. apply
    Also, is there a way to do sub-accordions?
    Yes. Create it in a panel body.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


Posting Permissions

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