Results 1 to 5 of 5

Thread: How to pass value from hiddent field to testfield declared with ExtJS FormPanel

  1. #1
    Ext User
    Join Date
    Apr 2010
    Location
    Rome Italy
    Posts
    21
    Vote Rating
    0
      0  

    Default 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,

  2. #2
    Ext User
    Join Date
    Oct 2008
    Location
    Ger
    Posts
    178
    Vote Rating
    0
      0  

    Default

    Are u using an ExtJS hiddenfield or an HTML hiddenfield?
    Code:
    Ext.getCmp('yourId').getValue();
    for extjs should work

    html hiddenfield, u can use something like this

    Code:
    Ext.get('yourhtmlid').dom.value

  3. #3
    Ext User
    Join Date
    Apr 2010
    Location
    Rome Italy
    Posts
    21
    Vote Rating
    0
      0  

    Default

    Thanks,
    I found very easy way. I used the normal java script 'document.getElementById('somevalue') and it worked.

    thanks,

  4. #4
    Sencha User darthwes's Avatar
    Join Date
    Mar 2010
    Posts
    633
    Vote Rating
    -10
      0  

    Default

    careful with document.getElement, Ext.get() is browser-agnostic....

  5. #5
    Ext User
    Join Date
    Apr 2010
    Location
    Rome Italy
    Posts
    21
    Vote Rating
    0
      0  

    Default

    what does this mean . Plz

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •