PDA

View Full Version : [ASK] Is possible to change xtype via function..?



thenevermore
18 Nov 2012, 8:10 PM
Dear all ,
i want to ask you something,

i have a session's item. if session is not empty then mymodule's xtype is changed..
is that possible..?


here's the example :



$beksit = $_SESSION['idbacksheet'];

skip..skip..skip..

doCekBeksit: function(){
var nobeksit = '$beksit';
if(nobeksit <> '')
{
nfp.form.findField('$ModuleName'+'textBS1').xtype = 'hidden';
nfp.form.findField('$ModuleName'+'textBS2').xtype = 'hidden';
}
else
{
nfp.form.findField('$ModuleName'+'_bukaloket').xtype = 'hidden';
}
}


Regards


Nice To Meet You All
1 second ago · http://3.bp.blogspot.com/-6uXPFr02yfE/TdvsxCLViqI/AAAAAAAAA4g/TFp_-T4PbyE/s400/3.png Like (http://www.sencha.com/forum/reputation.php?do=addreputation&p=910406) · http://2.bp.blogspot.com/-BfacKDG7xkE/TdveF4jZbtI/AAAAAAAAA4Q/u7tkCrdpT9w/s1600/2.png Add as Friend (http://www.sencha.com/forum/profile.php?do=addlist&userlist=buddy&u=522742)







Thanks for Visiting My thread?

evant
18 Nov 2012, 11:39 PM
No, you can't. Instead, just hide the field using the hide method.

thenevermore
19 Nov 2012, 1:20 AM
No, you can't. Instead, just hide the field using the hide method.

Thanks evant,
that's worked,,

:D