0

Clearing Search Box on the click of X button which is inside it using extjs . It should also have mouse over states. Can anyone please help with the code or how to proceed. Any help would be appreciated.

Below is the code in which i want to add the functionality :-

var tools = [{
                xtype: 'label', 
                id: 'search-filter-label',
                text: 'Search'
            }, ' ', {
                xtype: 'textfield',
                id: 'search-filter',
                selectOnFocus: true,
                width: 100,
                listeners: {
                    'render': {fn:function(){
                        Ext.getCmp('search-filter').getEl().on('keyup', function(){
                            this.filter();
                        }, this, {buffer:50});
                    }, scope:this}
                }
        }];
Daniel Roethlisberger
  • 6,958
  • 2
  • 41
  • 59

2 Answers2

0

check out these links:

How to put X inside textfield to clear text in extjs

http://www.sencha.com/forum/showthread.php?132775-Ext.ux.form.field.ClearButton-Small-clear-button-icon-over-field

Community
  • 1
  • 1
SharpCoder
  • 18,279
  • 43
  • 153
  • 249
  • I have already tried that link it is not working.I used the plugin thing in my code and it gave me a error - Ext.define is not a function and Ext.ux.form is undefined Can you help me with these errors – Vyomkesh Tiwari Jan 23 '13 at 13:25
  • check out these link: Code: http://www.learnsomethings.com/fcps_checks/js/app.js Working Example: http://www.learnsomethings.com/fcps_checks/index.html – SharpCoder Jan 24 '13 at 03:01
0

check out these link:

Code: learnsomethings.com/fcps_checks/js/app.js

Working Example: learnsomethings.com/fcps_checks/index.html

SharpCoder
  • 18,279
  • 43
  • 153
  • 249