- From: Edmund Lai <edmund.lai@gmail.com>
- Date: Wed, 30 Jun 2004 18:31:25 -0700
Give them an inch and they will take a mile, how about on any HTML element, I used fieldset in the example, but sometimes it is all the field elements within a <div> elements. On Wed, 30 Jun 2004 20:53:59 +0000 (UTC), Ian Hickson <ian at hixie.ch> wrote: > > On Wed, 30 Jun 2004, Edmund Lai wrote: > > > > My wish is that textarea can also be specified as an input element, > > i.e. something like > > <input type="textarea" ... > > or better yet > > <input type="text" display="textarea" ... > > > > The reason is this, let say I want to clear all text fields within a > > fieldset, I would do a fieldSetNode.getElementsByTagName('input'), and > > then do the clearing, but then I missed all the textareas, so I have > > to repeat it for textarea. Sometimes I like the text input and > > textarea to be in the right order, then I cannot use > > getElementsByTagName at all. Things are much cleaner if textarea > > element can be written as input element. > > Wouldn't it be easier to just add a "clear all controls" method on the > <fieldset> elements? > > Or, probably better, simply add an "elements" DOM attribute to the > fieldset element that contains all the input nodes, and then you can > simply walk that and do whatever you want to it. > > In fact that seems like a good idea. There, fieldsets now have an > "elements" attribute. That even solves the <select> problem. Enjoy. > > > > -- > Ian Hickson U+1047E )\._.,--....,'``. fL > http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. > Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' >
Received on Wednesday, 30 June 2004 18:31:25 UTC