Note that there are some explanatory texts on larger screens.

plurals
  1. POSencha Touch 2 Slider Produces Blank Screen
    primarykey
    data
    text
    <p>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 : <a href="https://stackoverflow.com/questions/6618606/show-hide-a-toolbar-with-slide-animation-in-sencha-touch">Show/hide a toolbar with slide animation in Sencha Touch</a> but a blank white screen is produced. Why would this occur?</p> <pre><code>&lt;script type="text/javascript"&gt; 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] }); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload