View Full Version : Uncaught TypeError

8 Dec 2011, 10:12 AM
I've got a strange problem regarding to JavaScript (according to Google), but I can't find the solution. Only a few other people have encountered this problem and posted it on some kind of forum, so my case wasn't handled anywhere.

The error is: Uncaught TypeError Object #<HTMLFieldSetElement> has no method 'select'

In this code:

this.ownerCt.insert(this.ownerCt.items.length-1, [{...}]);

In the context, 'this' is a fieldset. The button does function as expected, but I think the error will cause problems sometime. Does anybody know a solution (or workaround)?

(Background information: I'm trying to add an element before the 'add'-button itself.)

8 Dec 2011, 11:50 PM
It had to do with the automatic focus on the first field, hidden outside my class, implemented by someone else, which focusses on the first textfield of the form, but that doesn't work with filefields.