PDA

View Full Version : Show and hide components on user input!



Sloger
5 May 2010, 4:51 AM
Hello,

I am building an application with ExtJS and need to accomplish the following:

I need to hide few components when the page renders and leave only one, the first one.
Then, when user fills in the first component, I have to show the second one. The user should hit enter or tab to proceed to the next step.

How can I solve this task, please.
Thank you...

httpdotcom
5 May 2010, 7:37 AM
function FullShowHide(str,act){
if ( act == "show" ) {
Ext.getCmp(str).show();
Ext.getCmp(str).enable();
} else {
Ext.getCmp(str).hide();
Ext.getCmp(str).disable();
}
}


Might not be pretty, but it works.