Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8433057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:17:12+00:00 2026-06-10T06:17:12+00:00

I am trying to create a vertical slider using sencha touch 2 for a

  • 0

I am trying to create a vertical “slider” using sencha touch 2 for a mobile device when the user clicks on a button. I’m pretty new to Javascript but I have covered the basics. I tried to follow what was done here : Show/hide a toolbar with slide animation in Sencha Touch but a blank white screen is produced. Why would this occur?

<script type="text/javascript">
        function clicked(id) {
        if(id == "hist"){

    var showAlert = function(btn, event) {
        Ext.Msg.alert('Title', 'Diste ' + event.type + ' en el botón "' + btn.text + '"', Ext.emptyFn);
    };

    var tapHandler = function(button, event) {
        mainPanel.setActiveItem(blue, {type: 'slide'});
    };

    var backHandler = function(button, event) {
        mainPanel.setActiveItem(green, {type: 'slide', direction: 'right'});
    };



    var green = new Ext.Panel({
        dockedItems: [{
            xtype: 'toolbar',
            ui: 'light',
            title: 'My Toolbar',
            items: [{
                text: 'Sobre App',
                ui: 'round',
                handler: showAlert
            }, { xtype:'spacer'}, {
                text: 'Check-in',
                ui: 'forward',
                handler: tapHandler
            }]
        }],
        style: 'background-color:#3b7E3b',
        html: 'Green'
    });

    var blue = new Ext.Panel({
        dockedItems: [{
            xtype: 'toolbar',
            ui: 'light',
            title: 'Check-in',
            items: [{
                text: 'Back',
                ui: 'back',
                handler: backHandler
            }]
        }],
        style: 'background-color:#3b3b7E',
        html: 'Blue'
    });

    var mainPanel = new Ext.Panel({
        layout: 'card',
        fullscreen : true,
        items: [green, blue]
    });
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T06:17:13+00:00Added an answer on June 10, 2026 at 6:17 am

    Try this

    var mainPanel,blue,green;
    
    Ext.application({
        launch: function() {
            green = new Ext.Panel({
                items:[
                    {
                        xtype:'toolbar',
                        title:'My Toolbar',
                        ui:'light',
                        docked:'top',
                        items: [
                            {
                                text: 'Sobre App',
                                ui: 'round',
                                handler: showAlert
                            },
                            {
                                xtype:'spacer'
                            },
                            {
                                text: 'Check-in',
                                ui: 'forward',
                                handler: tapHandler
                            }
                        ]
                    }
                ],
                style: 'background-color:#3b7E3b',
                html: 'Green'
            });
    
            blue = new Ext.Panel({
                items:[
                    {
                        xtype:'toolbar',
                        title:'Check-In',
                        ui:'light',
                        docked:'top',
                        items: [
                            {
                                text: 'Back',
                                ui: 'back',
                                handler: backHandler
                            }
                        ]
                    }
                ],
                style: 'background-color:#3b3b7E',
                html: 'Blue'
            });
    
            mainPanel = new Ext.Panel({
                layout: 'card',
                fullscreen : true,
                items: [green,blue]
            });
            Ext.Viewport.add(mainPanel);
        }
    });
    
    var showAlert = function(btn, event) {
        Ext.Msg.alert('Title', 'Diste ' + event.type + ' en el botón "'
                + btn.text + '"', Ext.emptyFn);
    };
    
    var tapHandler = function(button, event) {
        mainPanel.animateActiveItem(blue,{type: 'slide'});
    };
    
    var backHandler = function(button, event) {
        mainPanel.animateActiveItem(green, {type: 'slide', direction: 'right'});
    }; 
    

    Your html file should look like this

    <!DOCTYPE HTML>
    <html manifest="" lang="en-US">
        <head>
            <meta charset="UTF-8">
            <title>Sencha Touch Knob</title>
            <link rel="stylesheet" type="text/css" href="stylesheets/sencha-touch.css">
            </link>
            <script type="text/javascript" src="javascripts/sencha-touch-all-debug.js">  
            </script>
            <script type="text/javascript" src="javascripts/app.js"></script>
        </head>
        <body>
        </body>
    </html>
    

    sencha-touch.css,sencha-touch-all-debug.js files will come with the library. Put the above javascript code and put it in a new js file named app.js.

    If there are any errors, they will show up in the chrome developer tools console.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create to a vertical navigation menu using CSS sprites. I
I am trying to create a vertical scroller using jquery and I am having
I'm trying to create a vertical button in PHP, but I have problem with
new to css. trying to create horizonal and vertical menus with list. my vertical
I'm trying to create UITableView with vertical gridlines, using method described here: http://www.iphonedevx.com/?p=153 .
I'm trying to create a vertical menu and I need to make a multicolumn
I'm trying to use a kriging function to create vertical maps of chemical parameters
I'm trying to create a grip for a vertical bar in my app, to
I am trying to create a MainScreen with vertical scrolling. From what I've read
I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.