PDA

View Full Version : Bug? getValue from DOMQuery



cutigersfan
27 Sep 2007, 11:59 AM
I'm using the following piece of code:

Ext.select('#year').getValue()Of course it doesn't work as I'd expect. Firebug was able to debug it, but a weird thing was shown. The getValue() call goes to an 'invoke' function which calls the getValue() fcn. getValue() returns the value I'm looking for, but the return value gets lost going back through the invoke() fcn. It ends up returning 'this' (which is the composite object) instead of the getValue() result.

Surely I'm missing something...

P.S. the select only returns one element in this case. I have tried where it returns multiple and the result is the same.

evant
27 Sep 2007, 1:43 PM
Ext.select returns a CompositeElement/CompositeElementLite, it doesn't support getValue.

What you want to do is



Ext.get('year').getValue();