Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sencha show / hide element

I have a simple form, and I work with a button that has a handler to get the submit. When the user clicks that button, I want to show a 'DIV'-element.

How is it possible to show / hide a specific element in Sencha?

Thanks in advance!

like image 965
ndequeker Avatar asked Nov 30 '25 14:11

ndequeker


2 Answers

To show a component:

Ext.getCmp('YourDivID').show();

To hide a component:

Ext.getCmp('YourDivID').hide();

Before this, you have to of course create a component with YourDivID.

like image 166
Nicodemuz Avatar answered Dec 03 '25 03:12

Nicodemuz


You have to use getCmp in order to select an element,

but you have to use Ext.select() in order to select an HTML element like divs.

Example usage:

Ext.select("#yourdiv").hide();
like image 24
Andy Bee Avatar answered Dec 03 '25 03:12

Andy Bee



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!