S
SAM
Le 5/9/10 11:39 PM, David Mark a écrit :
And the label has not to be the container of the form element,
but it may, so if ...
Clicking the label gives focus to its associated element,
the 1st step of the demand is reached.
The for attribute allows to know which DOM element will be then used.
(with gEBI, at least for others than IE)
The problem I met is that curious way that IE (6 in my tests) gives or
kept focus to this or that (the select, the submit-button ...) when
clicking here or there.
nick said:AFAIK you don't need the 'for' attribute if the control is inside ofLe 5/9/10 8:49 AM, nick a écrit :
[...]
I'm working on another Chrome extension. I want to pop the dropdown
open when the user clicks its containing <label>.
<label onmouseover="dropDown(this)" for="select_1">
blah blah ... ... :
<select id="select_1"
onclick="dropUp(this); doThat(this)">
... ...
</label>
the label
You don't, but you should avoid that construct for compatibility reasons.
And the label has not to be the container of the form element,
but it may, so if ...
Clicking the label gives focus to its associated element,
the 1st step of the demand is reached.
The for attribute allows to know which DOM element will be then used.
(with gEBI, at least for others than IE)
The problem I met is that curious way that IE (6 in my tests) gives or
kept focus to this or that (the select, the submit-button ...) when
clicking here or there.