PDA

View Full Version : Trying to hide Window Component & render Panel Component



Abhishek Pandey
16 Sep 2013, 6:33 AM
Window Component is rendered in <div> element .

entries in index.jsp :

<link rel="stylesheet" type="text/css" href="resources/ext-all.css"></link>

<!-- Load All Necessary Ext-JS Source Files -->

<script type="text/javascript" src="extjs/ext-all.js"></script>

<script type ="text/javascript" src = "app/app.js" > </script>


</head>

<body>
<div class="logo" id = "logoDiv">
<a>
<img src="images/logo.jpg" />
</a>
</div>

</body>

app.js------>


Ext.onReady(function(){

var myPanel ;
var newPanel = function(btn){
if (!myPanel){
/*var win = this.down('loginWin');
win.hide();*/

Ext.getCmp('logoDiv').hide();---->My Try....
var newPanel = new Ext.Panel({

height : 500 ,
width : 500 ,
html : 'This is Login Page' ,
renderTo : Ext.getBody()
});
}
};
var loginForm = new Ext.Window({

title: 'HPHC Login',
name : 'loginWin',
frame:true,
width: 320,
bodyPadding: 10,
defaultType: 'textfield',
defaults: {
anchor: '100%'
},

items: [
{
allowBlank: false,
fieldLabel: 'User ID',
name: 'user',
emptyText: 'user id'
},
{
allowBlank: false,
fieldLabel: 'Password',
name: 'pass',
emptyText: 'password',
inputType: 'password'
},
],

buttons: [{
text:'Login' ,
name : 'loginBtn' ,
handler : newPanel
}
]
});

loginForm.show("logoDiv");

});



Please Help me on this.

Thanks In Advance

Abhishek Pandey
23 Sep 2013, 5:36 AM
I figured this out

Gary Schlosberg
25 Sep 2013, 7:28 PM
You might help another community member or two if you post the solution you came to. Thanks.

Abhishek Pandey
26 Sep 2013, 12:30 AM
:)