-
13 Apr 2010 2:14 PM #1
How to pass value from hiddent field to testfield declared with ExtJS FormPanel
How to pass value from hiddent field to testfield declared with ExtJS FormPanel
Hello,
I am very new to ExtJS and have been trying to resolve the following issue;
I have hidden field with id and name inside html and it already has value and I want to pass it to the the textfield when the html form is loaded. I have tried to use getCmp('id).getvlaue(), getvalue ect but I am still not able to display the values. I would appreciate if someone can send me the correct script for it.
thanks,
-
14 Apr 2010 1:29 AM #2
Are u using an ExtJS hiddenfield or an HTML hiddenfield?
for extjs should workCode:Ext.getCmp('yourId').getValue();
html hiddenfield, u can use something like this
Code:Ext.get('yourhtmlid').dom.value
-
15 Apr 2010 11:39 AM #3
Thanks,
I found very easy way. I used the normal java script 'document.getElementById('somevalue') and it worked.
thanks,
-
15 Apr 2010 12:55 PM #4
careful with document.getElement, Ext.get() is browser-agnostic....
-
20 Apr 2010 11:39 PM #5


Reply With Quote
. Plz