<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: Modal dialog does not close after Submit</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/modal-dialog-does-not-close-after-submit</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/modal-dialog-does-not-close-after-submit/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>user982734 on Modal dialog does not close after Submit</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/modal-dialog-does-not-close-after-submit#p20307</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/modal-dialog-does-not-close-after-submit#p20307</guid>
        	        	<description><![CDATA[<p>This is the first time I am using jqGrid and I am a novice at jQuery. I started with the template at<br /><a href="http://suddendevelopment.com/?p=38" rel="nofollow" target="_blank">http://suddendevelopment.com/?p=38</a><br />and added<br />closeAfterAdd: true<br />and<br />closeAfterEdit: true<br />but it still doesn&#39;t do what I want. I am not sure if I have added these lines correctly -- e.g., in the right place.<br />Cell editing and grouping is not working for me yet so those parts are commented out for now. I want to get this Submit issue out of the way first if I can.<br />Thanks!</p>
<p>jQuery(document).ready(function(){<br />&#160;&#160; &#160;jQuery("#htmlTable").jqGrid({<br />&#160;&#160; &#160;&#160;&#160; &#160;url:&#39;jqGridCrud.php&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;editurl:&#39;jqGridCrud.php&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;closeAfterAdd:true,<br />&#160;&#160; &#160;&#160;&#160; &#160;closeAfterEdit:true,<br />&#160;&#160; &#160;&#160;&#160; &#160;datatype:&#39;json&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;mtype:&#39;POST&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;colNames:[<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#39;id&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,&#39;Date&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,&#39;Loc&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,&#39;Name&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,&#39;Phone&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,&#39;Major&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;],<br />&#160;&#160; &#160;&#160;&#160; &#160;colModel:[{<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;name:&#39;id&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,index:&#39;id&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,width:35<br />&#160;&#160; &#160;&#160;&#160; &#160;},{<br />&#160;&#160; &#160;&#160;&#160; &#160;name:&#39;piddate&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,index:&#39;piddate&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,width:100<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,sorttype:&#39;date&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,datefmt:&#39;Y-m-d&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,align:&#39;left&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,editable:true<br />&#160;&#160; &#160;&#160;&#160; &#160;},{<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;name:&#39;loc&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,index:&#39;loc&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,width:35<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,align:&#39;left&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,editable:true<br />&#160;&#160; &#160;&#160;&#160; &#160;},{<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;name:&#39;name1&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,index:&#39;name1&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,width:140<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,align:&#39;left&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,editable:true<br />&#160;&#160; &#160;&#160;&#160; &#160;},{<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;name:&#39;phone&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,index:&#39;phone&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,width:100<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,align:&#39;left&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,editable:true<br />&#160;&#160; &#160;&#160;&#160; &#160;},{<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;name:&#39;major&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,index:&#39;major&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,width:150<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,align:&#39;left&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,editable:true<br />&#160;&#160; &#160;&#160;&#160; &#160;}],<br />&#160;&#160; &#160;&#160;&#160; &#160;pager:jQuery(&#39;#htmlPager&#39;),<br />&#160;&#160; &#160;&#160;&#160; &#160;rowNum:10,<br />&#160;&#160; &#160;&#160;&#160; &#160;rowList:[10,20,30],<br />&#160;&#160; &#160;&#160;&#160; &#160;sortname:&#39;loc&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;sortorder:&#39;asc&#39;,<br />/*<br />&#160;&#160; &#160;&#160;&#160; &#160;cellEdit:true,<br />&#160;&#160; &#160;&#160;&#160; &#160;cellsubmit:&#39;remote&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;afterEditCell:function(id,name,val,iRow,iCol){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if( name == &#39;piddate&#39; ){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery(&#39;piddate&#39;,&#39;#celltbl&#39;).datepicker({dateFormat:&#39;yyyy-mm-dd&#39;});<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;},<br />*/<br />&#160;&#160; &#160;&#160;&#160; &#160;viewrecords:true,<br />&#160;&#160; &#160;&#160;&#160; &#160;imgpath:&#39;themes/basic/images&#39;,<br />/*<br />&#160;&#160; &#160;&#160;&#160; &#160;grouping:true,<br />&#160;&#160; &#160;&#160;&#160; &#160;groupingView:{<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;groupField:[&#39;loc&#39;]<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,groupColumnShow:[false]<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,groupDataSorted:true<br />&#160;&#160; &#160;&#160;&#160; &#160;},<br />*/<br />&#160;&#160; &#160;&#160;&#160; &#160;caption:&#39;Example jqGrid, With standard Navigation and editing&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;/* These are custom vars sent on each READ, or SELECT request */<br />&#160;&#160; &#160;&#160;&#160; &#160;postData:{<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;customVar1:&#39;customVal1&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;,customVar2:&#39;customVal2&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;}).navGrid(&#39;#htmlPager&#39;);</p>
<p>&#160;&#160; &#160;/* THIS is what we do when someone clicks the form submit button */<br />&#160;&#160; &#160;jQuery(&#39;#btnSubmit&#39;).click(function(){<br />&#160;&#160; &#160;&#160;&#160; &#160;jQuery.post(&#39;jqGridCrud.php&#39;,{<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;/* you can put whatever you need to send to the server here, there are easier ways to just serialize the form and send it, but this way is more versatile */<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;oper:&#39;edit&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;},function(){<br />&#160;&#160; &#160;&#160;&#160; &#160;},&#39;json&#39;);<br />&#160;&#160; &#160;});<br />});/* end of on ready event */</p>
<p>&#60;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&#62;<br />&#60;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&#62;<br />&#60;head&#62;<br />&#160;&#160; &#160;&#60;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&#62;<br />&#160;&#160; &#160;&#60;script type="text/javascript" src="/j/jquery-1.4.2.min.js"&#62;&#60;/script&#62;&#60;!-- jQuery <a href="http://jquery.com" rel="nofollow" target="_blank">http://jquery.com</a> --&#62;<br />&#160;&#160; &#160;&#60;script type="text/javascript" src="/script/jqgrid/src/i18n/grid.locale-en.js"&#62;&#60;/script&#62;&#60;!-- language file required by jqgrid --&#62;<br />&#160;&#160; &#160;&#60;script type="text/javascript" src="js/jqDnR.js"&#62;&#60;/script&#62;&#60;!-- Required for auto generated forms in nav bar&#160; --&#62;<br />&#160;&#160; &#160;&#60;script type="text/javascript" src="js/jqModal.js"&#62;&#60;/script&#62;&#60;!-- Required for auto generated forms in nav bar&#160; --&#62;<br />&#160;&#160; &#160;&#60;script type="text/javascript" src="jquery.jqGrid.js"&#62;&#60;/script&#62;&#60;!-- jqGrid <a href="http://www.trirand.com/blog/" rel="nofollow" target="_blank">http://www.trirand.com/blog/</a> --&#62;<br />&#160;&#160; &#160;&#60;script type="text/javascript" src="index.js"&#62;&#60;/script&#62;&#60;!-- specific js for this page. --&#62;<br />&#160;&#160; &#160;&#60;link rel="stylesheet" type="text/css" media="screen" href="themes/jqModal.css" /&#62;&#60;!-- jqModal css --&#62;<br />&#160;&#160; &#160;&#60;link rel="stylesheet" type="text/css" media="screen" href="themes/basic/grid.css" /&#62; &#60;!-- jqgrid theme --&#62;<br />&#160;&#160; &#160;&#60;link rel="stylesheet" type="text/css" media="screen" href="local.css" /&#62;<br />&#60;/head&#62;<br />&#60;body&#62;<br />&#160;&#160; &#160;&#60;table id="htmlTable" class="scroll"&#62;&#60;/table&#62;<br />&#160;&#160; &#160;&#60;div id="htmlPager" class="scroll"&#62;&#60;/div&#62;<br />&#60;/body&#62;<br />&#60;/html&#62;</p>
]]></description>
        	        	<pubDate>Thu, 14 Oct 2010 20:04:09 +0300</pubDate>
        </item>
</channel>
</rss>