EasyUI Forum
December 19, 2025, 03:08:05 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: reinitialize depending combo-box-field  (Read 8264 times)
jaimi
Full Member
***
Posts: 121


View Profile
« on: January 17, 2015, 12:20:12 AM »

Hi, I created the following combo-box:

  $('#GLL_UELN').combobox({
   url: 'pferd.act.php?frm=frmDET&act=L&lkp=GLL'
  ,valueField: 'GLL_UELN'
  ,textField: 'GLL_GER'
  ,required: true
  ,multiple: false
  ,width   : 250
  ,height  : 26
  ,editable: true
  ,disabled: false
  ,readonly: false
  ,value   : 'unbekannt'
  ,onBeforeLoad: function(){}
  ,onSelect: function(rec){
    vGLL_UELN = rec.GLL_UELN;
   vUELN = vGLL_UELN + '000' + vUELN.substr(6, 9);
   alert("onSelect: " + vUELN);
   var url = 'pferd.act.php?frm=frmDET&act=L&lkp=ZUG&par=' + vUELN;
    $('#ZUG_AREA').combobox('reload', url);
   }
  });

on select it loads a depending combobox:

  $('#ZUG_AREA').combobox({
    valueField: 'OLT31H001T_KEY'//'BRE_UELN'
   ,textField: 'ZUG_AREA'
   ,required: true
   ,multiple: false
   ,width   : 250
   ,height  : 26
   ,editable: true
   ,disabled: false
   ,readonly: false
   ,value   : 'unbekannt'
   ,onBeforeLoad: function(rec){
      alert(rec.OLT31H001T_KEY);
   }
   ,onSelect: function(rec){
    alert("onSelect: " + vUELN + " : " + rec.OLT31H001T_KEY + " : " + rec.BRE_UELN);
     vBRE_UELN = rec.BRE_UELN;
     vUELN = vUELN.substr(0,3) + vBRE_UELN + vUELN.substr(6,9);
    }
  });
 
  if ($("#ZUG_AREA").length) {
   var tbZUG_AREA = $('#ZUG_AREA').combobox('textbox');

   tbZUG_AREA.add(tbZUG_AREA.parent())
    .css("background-color","#1a1a1a")
    .css("color","#fff")
    .css("border","none")
    .css("font-size","14px")
    .css("padding-left","5px");

   tbZUG_AREA.parent()
    .tooltip({
      position: 'right',
      content: '<span>W&auml;hlen Sie das Zuchtgebiet aus.</span>'
   });   
  }

BUT: The value of tbZUG_AREA.parent() still holds the one from the last selection. How to reinitialize the value with "unbekannt" as defined?

THX, Jaimi
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: January 17, 2015, 08:01:17 AM »

BUT: The value of tbZUG_AREA.parent() still holds the one from the last selection. How to reinitialize the value with "unbekannt" as defined?

Please describe your question in more detail.
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!