EasyUI Forum
September 14, 2025, 06:07:03 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: how to link the two combobox..??  (Read 14961 times)
andy
Newbie
*
Posts: 7


View Profile Email
« on: May 21, 2012, 06:33:55 AM »

Hi all,

I have two combobox, there are origin and address.
My problem is how can display combobox address based on selected orgin.


Regards.  Smiley
Logged
andy
Newbie
*
Posts: 7


View Profile Email
« Reply #1 on: May 22, 2012, 05:39:49 AM »

$('#job_text_origin').combogrid
      ({ 
         url:'https://127.0.0.1/live_planning/index.php/job/fcn_job_getcity', 
         idField:'city_id',  textField:'city_name',  mode:'remote', fitColumns:true,
         columns:
         [[
            {field:'city_id',title:'Id',width:25},
            {field:'city_name',title:'City',width:100}
         ]],
         
         onSelect:function(row) {
            $link=$('#job_text_origin').combobox('getValue');
                 //Autocomplete job_text_origin address
               $('#job_text_originaddress').combogrid
               ({
                  panelWidth:600, 
                  url:"https://127.0.0.1/live_planning/index.php/job/fcn_job_getaddress/"+$link,
                  idField:'site_id', textField:'site_address',  mode:'remote', fitColumns:true,
                  hasDownArrow:false,
                  columns:
                     [[
                        {field:'site_id',title:'Id',width:20},
                        {field:'site_address',title:'Address',width:390}
                     ]]
                   
               });
               //end autocomplete
         }
         
      });
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!