PDA

View Full Version : Access Field Value After Form Load



TampaBay55
16 May 2009, 1:06 PM
Gurus:

I need your help with this. I am struggling with concepts and I am not sure if I strayed off course and gone into analysis paralysis. My goal is simple.....assign the value of CLI_RECORDID to a local variable after the form load. I thought I had it earlier but I celebrated too quickly.



var cliRecord = Ext.data.Record.create([
{name:'CLI_RECORDID'},
{name:'CLI_CLIENTCODE'},
]);
var cliReader = new Ext.data.JsonReader({
id :'CLI_RECORDID',
root :'RECORD'
},cliRecord);
var cliRecordID = new Ext.form.Field({
name :'CLI_RECORDID',
hidden : true
})
var cliClientCode = new Ext.form.Field({
fieldLabel: 'Client Code',
name : 'CLI_CLIENTCODE',
width : 140
});
cliFormPanel.on('load',function(){
var cliDataID = ??????? <============Everything I've tried here has led me to disappointment.
};
cliFormPanel.getForm().load({
url:'clidatahandler.json',
method: 'GET',
waitMsg:'Loading Data...'
});
I throw myself on your mercy. Thanks.

Animal
17 May 2009, 1:21 AM
What... what what on EARTH are you attempting with all that random code?

What are those first 17 lines there for???

According to the API docs, what events do FormPanel and BasicForm expose?

Hint: Use the "Hide Inherited Members" button to filter out inherited members.

Which event do yoiu think might be useful?