Load jtable in jquery UI dialogue -
i want use jtable in jquery ui dialogue widget. i'm loading content of dialogue widget dynamically follows
$( "#dialog4" ).dialog({ autoopen: false, height:$(window).height() - 50, width:$(window).width() - 50, show: { effect: "blind", duration: 400, }, hide: { effect: "explode", duration: 400 }, open: function (){ $(this).load("managegroupmembers.jsp"); } });
my jtable code present in managegroupmembers.jsp. follows:
<script> $(function() { $('groupmembers') .jtable( { title : 'members in group', jqueryuitheme : true, selecting : true, //enable selecting multiselect : true, //allow multiple selecting selectingcheckboxes : true, paging : true, pagesize : 20, pagesizes : [ 20, 50, 75, 100, 200, 500 ], defaultsorting : 'fullname asc', sorting : true, actions : { listaction : 'group' }, fields : { groupid : { key : true, list : false }, memberid : { key : true, list : false }, fullname : { create : false, edit : false, title : 'name', width : '15%' }, memberrole : { title : 'role in group', width : '7%', display : function(data) { var rolename = ""; if (data.record.memberrole != null) { rolename = data.record.memberrole.rolename; } return rolename; } }, membersince : { list : true, title : 'member since', inputclass : 'text ui-widget-content ui-corner-all inputclass' } } }); $('#groupmembers').jtable('load'); }); </script> <div id="groupmembers" class="ui-widget"></div>
i tried debug code using chrome's developer tools , i'm seeing following error: "cannot call methods on jtable prior initialization; attempted call method 'load'" can me here? in advance.
you not initializing jtable because forgot # in front of groupmembers id in init code....
$('groupmembers')
should be:
$('#groupmembers')
Comments
Post a Comment