View Full Version : How do you get TextField to execute setValue()?

5 Nov 2009, 11:26 AM
I'm learning ExtJS (with Coolite kit) and trying to perform a very simple operation - look up textfield by ID and set its value. I managed to do it using a hack:


Now, I'm trying to do it the proper way:


... but it's not working. On the first page request there's a JS error "this.addEvents is not a function"; on subsequent requests there are no errors, but nothing is happening. Any idea?

5 Nov 2009, 11:39 AM
Whats with all the extra parenthesis? Is that a Coolite thing?

Just this should do it...assuming your text field has been created already.


5 Nov 2009, 11:42 AM
It looks like Java casting.

There are no classes in Javascript.

5 Nov 2009, 12:18 PM
Thanks VinylFox, that worked!

Animal, looks like I gotta get my JS skills back in shape :) Haven't touched it in almost 4 years.