ndequeker
ndequeker

Reputation: 7990

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!

Upvotes: 3

Views: 8396

Answers (2)

Andy Bee
Andy Bee

Reputation: 21

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();

Upvotes: 2

Nicodemuz
Nicodemuz

Reputation: 4104

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.

Upvotes: 6

Related Questions