EasyUI Forum
April 19, 2024, 04:32:32 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: [SOLVED] ribbon combobox set id and get value  (Read 7219 times)
catpaw
Jr. Member
**
Posts: 85


View Profile Email
« 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?
« Last Edit: February 05, 2017, 06:44:21 PM by catpaw » Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: February 03, 2017, 05:22:28 AM »

Please try to download the updated ribbon extension from http://www.jeasyui.com/extension/ribbon.php
Logged
catpaw
Jr. Member
**
Posts: 85


View Profile Email
« Reply #2 on: February 03, 2017, 08:44:15 AM »

Indeed. The updated version works correctly

Thank you jarry
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!