PDA

View Full Version : Ext Js 3.3.1



henryivy
24 Feb 2011, 10:16 PM
Hi,
Recently i was upgraded the ExtJs 3.2.2 to 3.3.1.After updating
var id= document.getElementById('pid').value;
is not working.

Thanks

Condor
25 Feb 2011, 12:29 AM
That is plain javascript code that isn't using Ext at all, so you have to give more information before I can answer anything.

henryivy
25 Feb 2011, 12:53 AM
That is plain javascript code that isn't using Ext at all, so you have to give more information before I can answer anything.


My code

function createTaxonomyCombo() {
taxonomyCombo = new Ext.form.ComboBox({
typeAhead: true,
triggerAction: 'all',
transform: 'cboTaxonomy',
autoWidth: true,
autoHeight: true,
editable: false,
selectOnFocus: true,
valueField:'cboTaxonomy',
listeners: {
'select': function () {
// selectTaxonomyId = document.getElementById("cboTaxonomy").value; --Not Working
selectTaxonomyId = document.PeerGroupSearch.cboTaxonomy.value;
}
}

});

if (selectTaxonomyId == 'initial') {
// selectTaxonomyId = document.getElementById("cboTaxonomy").value; --Not Working
selectTaxonomyId = document.PeerGroupSearch.cboTaxonomy.value;
}
}


in the above code,if you can observe there is one line of code has been commented.If i use in that manner,i can't able to get the value from cboTaxonomy.

So, that's why i am using another way to get the value from cboTaxonomy,like (selectTaxonomyId = document.PeerGroupSearch.cboTaxonomy.value;).

My question is, why document.getElementById("cboTaxonomy").value is not working in ExtJs 3.3.1.
But this is working properly in ExtJs 3.2.2

thanks

Condor
25 Feb 2011, 1:07 AM
'transform' doesn't set the id of the combobox anymore.

But why would you want to use this anyway? You should be using:

'select': function (combo, record, index) {
var selectTaxonomyId = record.get('value');
...
}

henryivy
25 Feb 2011, 2:30 AM
'transform' doesn't set the id of the combobox anymore.

But why would you want to use this anyway? You should be using:

'select': function (combo, record, index) {
var selectTaxonomyId = record.get('value');
...
}



Sorry,
even though i am not able to retriving the value from combobox using

'select': function (combo, record, index) {
var selectTaxonomyId = record.get('value');
...
}

kindly please see my code i was mention in above comment.

tobiu
25 Feb 2011, 2:47 AM
he did. your example is way to uncomplete.

try:


'select': function (combo, record, index) {
console.log(record);
console.log(record.data);
...
}

and look what firebug tells you.