Dropdown options

Discuss MySQL Ajax Table Editor Pro Version

Dropdown options

Postby buconet » Sat Feb 20, 2016 12:10 am

Can someone please help me with this resolve urges me . The pro version does not work the same way Onchange a DropDown event . I want to do is to select a record from the first second Dropdown Dropdown be filled with elements belonging to the first.

I tenfo code is as follows:

Code: Select all

$tableColumns['CVE_ESTADOS_REP'] = array('display_text' => 'Estado', 'perms' => 'EVCTAXQ',
      'join' => array('table' => 'estados_rep', 'column' => 'CVE_ESTADOS_REP',
      'display_mask' => "concat(estados_rep.NOMBRE)", 'type' => 'left'),
      'input_info' => 'onchange="mate1_.toAjaxTableEditor(\'filtrar_municipios\',this.value);"');       
         
      $tableColumns['CVE_MUNICIPIOS'] = array('display_text' => 'Municipios', 'perms' => 'EVCTAXQ', 'join' => array('table' => 'municipios', 'column' => 'cve_municipios', 'display_mask' => "concat(municipios.NOMBRE)", 'type' => 'left'));
           


Code: Select all
//The function
function LlenarComboMunicipios($CVE_CAR)
                   {
               $IDCARRERA=$CVE_CAR;
               //echo $IDCARRERA;
               
                      $query = "SELECT CVE_MUNICIPIOS,NOMBRE,CLAVE FROM MUNICIPIOS WHERE CVE_ESTADOS_REP=$CVE_CAR;";
                 $result = mysql_query($query) or die('Debe Seleccionar un registro de la lista: '); 
                   
                      $html = '<select id="CVE_MUNICIPIOS" name="CVE_MUNICIPIOS">';
                 while ($row = mysql_fetch_assoc($result)) {
                     $html .= "<option value='".$row['CVE_MUNICIPIOS']."'>".$row['NOMBRE']."</option>";
                      }
                          $html .= '</select>';
                          $this->Editor->retArr[] = array('where' => 'innerHTML', 'layer_id' => 'CVE_MUNICIPIOS_input_cell', 'value' => $html);
            
                   
                         
                  
                       }


an the useractions:
Code: Select all
                  $userActions = array('filtrar_municipios' => array(&$this,'LlenarComboMunicipios'));
      $this->Editor->setConfig('userActions',$userActions);


the PRO version does not work

By selecting an option from the Dropdown CVE_ESTADOS_REP me generates this error message :

CVE_MUNICIPIOS_input_cell does not exist

Please help me, any solutions??????
buconet
 
Posts: 28
Joined: Thu May 15, 2014 8:32 pm

Re: Dropdown options

Postby scottdia » Fri Dec 23, 2016 4:53 pm

I am having exactly the same issue. Admin, can you give us a hand with this?
scottdia
 
Posts: 7
Joined: Wed Sep 07, 2016 8:01 pm

Re: Dropdown options

Postby admin » Fri Jan 27, 2017 3:34 pm

Are you using insert in place or the regular add screen?
admin
Site Admin
 
Posts: 1502
Joined: Fri Jul 11, 2008 1:34 am

Re: Dropdown options

Postby scottdia » Wed Apr 12, 2017 6:55 pm

I am using the insert in place
scottdia
 
Posts: 7
Joined: Wed Sep 07, 2016 8:01 pm


Return to Pro Version

Who is online

Users browsing this forum: No registered users and 7 guests

cron