EasyUI Forum
September 15, 2025, 08:21:23 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: label for and tabindex can't using  (Read 9338 times)
it-leon
Newbie
*
Posts: 1


View Profile Email
« on: July 08, 2015, 08:21:06 PM »

label for can't using

click label focus will at input  but it is not like this
================================1===========================================
<label id="quo_no_t" for="quo_no"><span class="labelContent" itdept-ui="true">Quotation No.</span>: </label>

but input no id  not general quo_no

<span class="textbox" style="width: 138px; height: 20px;"><input type="text" autocomplete="off" class="textbox-text validatebox-text" placeholder="" style="margin-left: 0px; margin-right: 0px; padding-top: 2px; padding-bottom: 2px; width: 130px;"><input type="hidden" class="textbox-value" name="quo_no" value="qqq"></span>

===========================================================================


================================2===========================================

i using html helper

C#
   var lhtml_quo_no            = Html.itUI().UITextbox("quo_no", ls_module, "").multiLine(false);
  @lhtml_quo_no.td(1, 2).label("sales.label.quo_no").tabIndex(1) <-- here

HTML
<input type="text" value="" (tabindex="1" here is not good ) ng-model="cntrl_data.maint.sch_crit.quo_no" ittextbox="" id="quo_no" data-itdept-type="itTextbox" data-itdept-options="&quot;width&quot;:140,&quot;width&quot;:140" class="ng-untouched ng-valid textbox-f ng-dirty ng-valid-parse" style="display: none;" textboxname="quo_no" itdept-ui="true">

this html can't not found  tabindex
<input type="text" autocomplete="off" class="textbox-text validatebox-text" placeholder="" style="margin-left: 0px; margin-right: 0px; padding-top: 2px; padding-bottom: 2px; width: 130px;">

 Roll Eyes

===========================================================================



« Last Edit: July 08, 2015, 08:32:19 PM by it-leon » Logged
jarry
Administrator
Hero Member
*****
Posts: 2298


View Profile Email
« Reply #1 on: July 09, 2015, 03:00:33 AM »

When using textbox component, the input box is not the original <input> element, so the 'id' and 'tabindex' attributes are not attached to this input box. To solve this issue, please try the following code.
Code:
<script type="text/javascript">
$(function(){
$('.textbox-text').each(function(){
var t = $(this).parent().prev();
$(this).attr('id', t.attr('id') ? t.attr('id')+'-textbox' : '');
$(this).attr('tabindex', t.attr('tabindex'));
})
})
</script>
<label for="e1-textbox">label</label>
<input id="e1" class="easyui-textbox" tabindex="2">

Please notice that the <label> element's id attribute value must have a '-textbox' suffix.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!