Label : ForID = "htmlFor" vs "for"
New Community Forums available at http://forums.ext.net
 

Coolite Forums

Welcome Guest ( Login | Register )
 
Label : ForID = "htmlFor" vs "for"
Subscribe
Last Login: 4/30/2010 10:27:54 AM
Posts: 10,
Posted 2/25/2010 11:09:00 AM

Group: Coolite Early Adopter
 A label defined as such:

<ext:Anchor>
  <ext:Label runat="server" ForID="tbCity" Text="City" X="5" Y="65" />                                     
</ext:Anchor>

will result in HTML like:

<label class="x-label x-abs-layout-item" id="ctl10" htmlfor="tbCity" style="left: 5px; top: 65px;">
  <img src="/extjs/resources/images/default/s-gif/coolite.axd" class="x-label-icon " style="display: none;">
  <span class="x-label-value">City</span>
</label>


whereas a fieldlabel (which should be equivalent in usage) results in:

<label class="x-form-item-label " style="width: 100px;" for="tbtbCity" id="ext-gen785">City:</label>


The major difference here is that one uses the IE-only "htmlfor" attribute, while the other defines the Chrome/Firefox-friendly "for" attribute (specified on the w3 site).

Please note that "htmlfor" is only recognized by IE8 if it's in Compatibility Mode.  In Standards Mode, it ignores the "htmlfor" attribute.  In both modes, "for" works properly.

Recommend changing "ForID" to generate "for" instead of "htmlfor".
Last Login: 7/5/2010 10:10:13 AM
Posts: 7,853,
Posted 2/28/2010 11:16:18 PM

Group: Core Development Team
Hi,

Fixed. Will be available in the upcoming 1.0 release 

--
Vladimir Shcheglov
Coolite Inc.
Development Team
Forum Guidelines | Coolite Examples | Coolite API Docs | ExtJS API Docs | Twitter
« Prev Topic | Next Topic »
Reading This Topic
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.
All times are GMT -5:00, Time now is 8:32pm