EasyUI Forum

General Category => General Discussion => Topic started by: catpaw on February 02, 2017, 05:48:47 PM



Title: [SOLVED] ribbon combobox set id and get value
Post by: catpaw on February 02, 2017, 05:48:47 PM
hi


Im using ribbon extension http://www.jeasyui.com/extension/ribbon.php

I have severals combobox and want to make them dependens

so I defined an id for each one. example code:

Code:
{
type:'combobox',
id:'cmb1',
valueField:'name',
textField:'name',
url:'retrieve/get_cmb1.php',
width:45,
panelHeight:'auto',
editable:false,
onSelect: function(rec){
var url = 'retrieve/get_cmb2.php?name='+rec.name; alert(url);
$('#cmb2').combobox('reload', url);
}//,
//onLoadSuccess:function(data){alert(JSON.stringify(data));},
//onLoadError:function(data){alert(JSON.stringify(data));}
},{
type:'combobox',
id:'cmb2',
valueField:'name',
textField:'name',
width:40,
panelHeight:'auto',
editable:false
}

but when Im trying getValue or reload one of them I get this:

Quote
Uncaught TypeError: Cannot read property 'nodeName' of undefined
    at Function.m.acceptData (jquery.min.js:2)
    at Q (jquery.min.js:4)
    at Function.data (jquery.min.js:4)
    at _a1a (jquery.easyui.min.js:13433)
    at _a29 (jquery.easyui.min.js:13495)
    at getValue (jquery.easyui.min.js:13593)
    at m.fn.init.$.fn.combo (jquery.easyui.min.js:13517)
    at m.fn.init.$.fn.combobox (jquery.easyui.min.js:13959)
    at HTMLAnchorElement.onSelect ((index):81)
    at _a4c (jquery.easyui.min.js:13734)

so I think that there is not able to read the id of the combobox element inside ribbon extension

Its that so?


Title: Re: ribbon combobox set id and get value
Post by: jarry on February 03, 2017, 05:22:28 AM
Please try to download the updated ribbon extension from http://www.jeasyui.com/extension/ribbon.php


Title: Re: ribbon combobox set id and get value
Post by: catpaw on February 03, 2017, 08:44:15 AM
Indeed. The updated version works correctly

Thank you jarry