javascript - Problem with JQGrid in Modal Dialog after reload page -



javascript - Problem with JQGrid in Modal Dialog after reload page -

i have give thanks helping me find solution of lastly question: jquery - problem modal dialog after reload page in div. solved using "class identifier" instead of "id".

but i'm stuck on problem. in modal dialog have jqgrid:

in example.jsp press button "reload". then, in "maincontent", appears button "find", open modal dialog jqgrid working.

but if press 1 time again "reload" button , "find" modal dialog appears, jqgrid in doesn't show result!

'cause seemed "creating elements same id" problem, seek phone call jqgrid class identifier, nothing.

here code.

example.jsp:

<script type="text/javascript"> $(document).ready(function() { $('#button1').button().click(function() { $("#maincontent").html('').load("example_1.jsp"); }); }); </script> <input id="button1" type="button" value="reload" /> <div id="maincontent"></div>

example_1.jsp:

<script type="text/javascript"> $(document).ready(function() { $(".b").button().click(function() { $(".d").jqgrid('setgridparam',{datatype:"json"}).trigger("reloadgrid"); $(".c").dialog("open"); }); $("#a_grid").jqgrid({ url:'search_customer.jsp', datatype: 'local', mtype: 'get', colnames:['sede','codice','ragione sociale'], colmodel :[ {name:'sede', index:'sede', width:20, search:true, stype:'select', edittype:'select', editoptions:{value:{'it':'it','cn':'cn'}}, searchoptions:{value:":all;it:it;cn:cn"}, editable:true, editrules:{required:true}}, {name:'codice_cliente', index:'codice_cliente', width:100, fixed:true, search:true, stype:'text', editable:true, editoptions:{size:6, maxlength:6}, editrules:{required:true}}, {name:'cliente', index:'cliente', search:true, stype:'text', editable:true, editoptions:{size:30, maxlength:50}, editrules:{required:true}} ], pager: jquery('#a_pager'), rownum:15, sortname: 'cliente', sortorder: 'asc', gridwiew: true, viewrecords: true, loadonce:false, ... ... }); jquery("#a_grid").jqgrid('navgrid','#a_pager', {edit:false, add:true, del:false, search:false, refresh:true}, {}, // edit options {}, // add together options {}, //del options {multiplesearch:true} //search options ); jquery("#a_grid").jqgrid('filtertoolbar',{stringresult:true, searchonenter:false}); $("#a_form").dialog({ autoopen: false, height: 480, width: 625, modal: true, close: function() { $("#a_grid").dialog("close"); } }); }); </script> <input type="button" value="find" class="b" /> <div id="a_form" title="cerca cliente" class="c"> <table id="a_grid" align="center" class="d"></table> <div id="a_pager" align="center"></div> </div>

thank in advance guys lose thier precious week-end time help me

javascript jquery jqgrid

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -