[whatwg] Re: Simple solution for select editable

voracity subs at voracity.org
Tue Jun 29 10:25:30 PDT 2004


Let me clarify some use cases for <combo>.

[Note: an alternative to the 'newname' attribute in the following would be for 
the WF2 UA to scan the children of the combo for an <input> and using the name 
as the name_new, and the type, pattern, etc. information to validate the newly 
entered data. Of course if that didn't occur, those attributes would just be 
specified in the <combo> opening tag.]

---------------------------------------

If the probability that the user will enter something new is high (and the 
submitted value would equal the displayed value), you would use:

<combo name="thing" newname="thing">
<input name="thing" type="text">
<select name="thing" style="display:none;">
<option>A</option>
</select>
</combo>

WF2 UAs would see:
<combo name="thing" newname="thing">
<option>A</option>
</combo>

legacy UAs would see:
<input name="thing" type="text">
(plus a hidden select)

(I'm not sure how this would work with <select editable> repeat=0.)

---------------------------------------

If the probability that the user will enter something new is low, you would use:

<combo name="thing" newname="thing_new">
<select name="thing">
<option value="1">A</option>
</select>
or enter a new value: <input type="text" name="thing_new">
</combo>

WF2 UAs would see:
<combo name="thing" newname="thing_new">
<option value="1">A</option>
</combo>

legacy UAs would see:
<select name="thing">
<option value="1">A</option>
</select>
or enter a new value: <input type="text" name="thing_new">

---------------------------------------

If the probability that the user will enter something new is 0 (which is useful 
for large lists), you would use:

<combo name="thing">
<select name="thing">
<option value="1">A</option>
</select>
</combo>

WF2 UAs would see:

<combo name="thing">
<option value="1">A</option>
</combo>

legacy UAs would see:

<select name="thing">
<option value="1">A</option>
</select>

---------------------------------------

One possible advantage of <combo> is that you can set its event handlers 
separate to the legacy <select> (or you could just assign them both the same 
function).

Either way, I'd really like to see either <combo> or <select editable> with 
repeat=0 for legacy implemented.

That's it from me. I've spent too much time on this already :)



More information about the whatwg mailing list