1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    1
    Vote Rating
    0
    du0012 is on a distinguished road

      0  

    Default how to hide broswer address bar when searchfiield is touch

    how to hide broswer address bar when searchfiield is touch


    After trying a couple of days but still can not find a way to hide the address bar when searchfield is touch. The demo site is: http://www.kdictionary.com . My code is as follows:

    Code:
    var resultPanel = new Ext.Panel({
                layout: 'fit',
                style: 'padding-bottom: 10px;'
            });
            
        
            var searchPanel = new Ext.Panel({
                dockedItems: {
                    id     :'test',
                    dock   : 'top',
                    xtype  : 'form',
                    cls    : 'x-toolbar-dark',
                    baseCls: 'x-toolbar',
                    height : 45,
                    itemId : 'newQueryForm',
                    
                    listeners: {
                        el: {
                            scope : this,
                        submit: function() {
                            var query = Ext.getCmp("newQueryField").getValue();
                            Ext.Ajax.request({
                                url: 'search.php?act=dict&q='+query,
                                success: function(e) {
                                    Ext.getCmp('carousel1').removeAll(true);
                                    ToolbarDemo.views.actioncard.tab.setBadge("");
                                    var responseTextArr = e.responseText.split('*');
                                    resultPanel.update(responseTextArr[0]);
                                    var methodcount = responseTextArr.length-1;
                                    if(methodcount > 0){
                                       ToolbarDemo.views.actioncard.tab.setBadge(methodcount);
                                       for(i=1;i<=methodcount;i++){
                                        Ext.getCmp('carousel1').add({html: responseTextArr[i]});
    
                                       }
                                       var w =  Ext.getCmp('carousel1').getWidth();
                                                                       var h =  Ext.getCmp('carousel1').getHeight();
                                                                       Ext.getCmp('carousel1').doComponentLayout(w,h);
                                                                       //Ext.getCmp('carousel1').doLayout();
        
                                    }
            
                                }
                            });
                        }
                    }
                    },
                    
                    items: {
                        xtype : 'searchfield',
                        name  : 'query',
                        id: 'newQueryField',
                        placeHolder: 'Search...'
                        
                    }
                }
            });
    
    
    ToolbarDemo.views.Searchcard = Ext.extend(Ext.Panel, {
        title: "Search",
        iconCls: "search",
        scroll: 'vertical',
        styleHtmlContent: true,
        initComponent: function() {
            Ext.apply(this, {            
                dockedItems: [searchPanel],
                items: [resultPanel]            
                
            });
            
            ToolbarDemo.views.Searchcard.superclass.initComponent.apply(this, arguments);
        }
        
    });
    
    Ext.reg('searchcard', ToolbarDemo.views.Searchcard);
    Last edited by du0012; 11 Apr 2012 at 3:28 PM. Reason: added [CODE] tags

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,756
    Vote Rating
    828
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The address bar doesn't hide automatically for you? In ST1 it has in my apps.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi