<?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: beforeSubmit  does not fire when I add a record</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/beforesubmit-does-not-fire-when-i-add-a-record</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/beforesubmit-does-not-fire-when-i-add-a-record/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>JoeWhitlock on beforeSubmit  does not fire when I add a record</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/beforesubmit-does-not-fire-when-i-add-a-record#p27087</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/beforesubmit-does-not-fire-when-i-add-a-record#p27087</guid>
        	        	<description><![CDATA[<p>Put your beforeSubmit in the add section.&#160; I have one in the edit and the add sections.&#160;</p>
]]></description>
        	        	<pubDate>Tue, 07 Aug 2012 21:22:06 +0300</pubDate>
        </item>
        <item>
        	<title>antonioberthely on beforeSubmit  does not fire when I add a record</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/beforesubmit-does-not-fire-when-i-add-a-record#p27056</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/beforesubmit-does-not-fire-when-i-add-a-record#p27056</guid>
        	        	<description><![CDATA[<blockquote>
<p>antonioberthely said:</p>
<p>Hi, when I add a new record or delete record beforeSubmit dont work. beforeSubmit&#160; only works when I edit records. Please helpme.</p>
<p>here is:</p>
<p>&#160;&#160; &#160;$("#list1").jqGrid({ <br />&#160;&#160; &#160;&#160;&#160;&#160; url:"/json.jsp?xaction=6&#38;ejFiscal="+$("select[name=cmb_ejercicio]").val()+"&#38;numOfc="+"ofc"+"&#38;idTipo="+"1"+"&#38;idModulo="+30, <br />&#160;&#160; &#160;&#160;&#160; &#160;datatype: "json", <br />&#160;&#160; &#160;&#160;&#160; &#160;colNames:[&#39;No. Oficio&#39;,&#39;Fecha de Oficio&#39;, &#39;Anexo&#39;, &#39;Nombre de quien firma&#39;, &#39;Cargo de quien firma&#39;,&#39;Nombre a quien se dirige&#39;,&#39;Cargo a quien se dirige&#39;,&#39;Observaciones&#39;], <br />&#160;&#160; &#160;&#160;&#160; &#160;colModel:[ {name:&#39;noficio&#39;,index:&#39;noficio&#39;, width:55, editable: true, editoptions:{size: 20}}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;foficio&#39;,index:&#39;foficio&#39;, width:90, editable: true,sorttype:&#39;date&#39;,editoptions:{type: "date"},formatter:&#39;date&#39;,formatoptions: {srcformat:&#39;d/m/Y&#39;, newformat: &#39;d/m/Y&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; editrules: {required:true, custom: true, custom_func:Validar}},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;tanexo&#39;,index:&#39;tanexo&#39;, width:100, editable: true, editoption:{size:50}}, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;nfirma&#39;,index:&#39;nfirma, invdate&#39;, width:100, editable: true, editoption:{size:50}}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;cfirma&#39;,index:&#39;cfirma&#39;, width:100, align:"right", editable: true, editoption:{size:50}}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;ndirige&#39;,index:&#39;ndirige&#39;, width:100, align:"right", editable: true, editoption:{size:50}}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;cdirige&#39;,index:&#39;cdirige&#39;, width:100,align:"right", editable: true, editoption:{size:50}}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;obs&#39;,index:&#39;obs&#39;, width:150, sortable:false, editable: true, edittype:"textarea", editoption:{rows:"2", cols:"10"}} ], <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowNum:10, <br />&#160;&#160; &#160;&#160;&#160; &#160;rowList:[10,20], <br />&#160;&#160; &#160;&#160;&#160; &#160;pager: &#39;#pager1&#39;, <br />&#160;&#160; &#160;&#160;&#160; &#160;sortname: &#39;id&#39;, <br />&#160;&#160; &#160;&#160;&#160; &#160;viewrecords: true, <br />&#160;&#160; &#160;&#160;&#160; &#160;sortorder: "desc", <br />&#160;&#160; &#160;&#160;&#160; &#160;editurl: "pages/fhpo/json.jsp?xaction=6&#38;idModulo=30&#38;idSegint=",<br />&#160;&#160; &#160;&#160;&#160; &#160;caption:"Detalle" }).navGrid( &#39;#pager1&#39;,<br />&#160;&#160; {view:false,del:true,add:true,edit:true,refresh:true,search:false},<br />&#160;&#160;&#160; { &#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; beforeSubmit:function(postdata, formid) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; postdata.obs=postdata.obs.replace(/s*[rn][rn t]*/g,"&#60;br /&#62;");<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; alert(postdata.obs+" "+postdata.file);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return[true,""]; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });</p>
</p>
</blockquote>
<hr />
]]></description>
        	        	<pubDate>Thu, 02 Aug 2012 20:55:14 +0300</pubDate>
        </item>
        <item>
        	<title>antonioberthely on beforeSubmit  does not fire when I add a record</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/beforesubmit-does-not-fire-when-i-add-a-record#p27055</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/beforesubmit-does-not-fire-when-i-add-a-record#p27055</guid>
        	        	<description><![CDATA[<p>Hi, when I add a new record beforeSubmit dont work. beforeSubmit&#160; only works when I edit records. Please helpme.</p>
<p>here is:</p>
<p>&#160;&#160; &#160;$("#list1").jqGrid({ <br />&#160;&#160; &#160;&#160;&#160;&#160; url:"/json.jsp?xaction=6&#38;ejFiscal="+$("select[name=cmb_ejercicio]").val()+"&#38;numOfc="+"ofc"+"&#38;idTipo="+"1"+"&#38;idModulo="+30, <br />&#160;&#160; &#160;&#160;&#160; &#160;datatype: "json", <br />&#160;&#160; &#160;&#160;&#160; &#160;colNames:[&#39;No. Oficio&#39;,&#39;Fecha de Oficio&#39;, &#39;Anexo&#39;, &#39;Nombre de quien firma&#39;, &#39;Cargo de quien firma&#39;,&#39;Nombre a quien se dirige&#39;,&#39;Cargo a quien se dirige&#39;,&#39;Observaciones&#39;], <br />&#160;&#160; &#160;&#160;&#160; &#160;colModel:[ {name:&#39;noficio&#39;,index:&#39;noficio&#39;, width:55, editable: true, editoptions:{size: 20}}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;foficio&#39;,index:&#39;foficio&#39;, width:90, editable: true,sorttype:&#39;date&#39;,editoptions:{type: "date"},formatter:&#39;date&#39;,formatoptions: {srcformat:&#39;d/m/Y&#39;, newformat: &#39;d/m/Y&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; editrules: {required:true, custom: true, custom_func:Validar}},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;tanexo&#39;,index:&#39;tanexo&#39;, width:100, editable: true, editoption:{size:50}}, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;nfirma&#39;,index:&#39;nfirma, invdate&#39;, width:100, editable: true, editoption:{size:50}}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;cfirma&#39;,index:&#39;cfirma&#39;, width:100, align:"right", editable: true, editoption:{size:50}}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;ndirige&#39;,index:&#39;ndirige&#39;, width:100, align:"right", editable: true, editoption:{size:50}}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;cdirige&#39;,index:&#39;cdirige&#39;, width:100,align:"right", editable: true, editoption:{size:50}}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;obs&#39;,index:&#39;obs&#39;, width:150, sortable:false, editable: true, edittype:"textarea", editoption:{rows:"2", cols:"10"}} ], <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowNum:10, <br />&#160;&#160; &#160;&#160;&#160; &#160;rowList:[10,20], <br />&#160;&#160; &#160;&#160;&#160; &#160;pager: &#39;#pager1&#39;, <br />&#160;&#160; &#160;&#160;&#160; &#160;sortname: &#39;id&#39;, <br />&#160;&#160; &#160;&#160;&#160; &#160;viewrecords: true, <br />&#160;&#160; &#160;&#160;&#160; &#160;sortorder: "desc", <br />&#160;&#160; &#160;&#160;&#160; &#160;editurl: "pages/fhpo/json.jsp?xaction=6&#38;idModulo=30&#38;idSegint=",<br />&#160;&#160; &#160;&#160;&#160; &#160;caption:"Detalle" }).navGrid( &#39;#pager1&#39;,<br />&#160;&#160; {view:false,del:true,add:true,edit:true,refresh:true,search:false},<br />&#160;&#160;&#160; { &#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; beforeSubmit:function(postdata, formid) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; postdata.obs=postdata.obs.replace(/\s*[\r\n][\r\n \t]*/g,"&#60;br /&#62;");<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; alert(postdata.obs+" "+postdata.file);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return[true,""]; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });</p></p>
]]></description>
        	        	<pubDate>Thu, 02 Aug 2012 20:53:52 +0300</pubDate>
        </item>
</channel>
</rss>