<?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: Show errors</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/show-errors</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/show-errors/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Show errors</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/show-errors#p27518</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/show-errors#p27518</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>Use console.log to see the response.</p>
</p>
<p>I&#39;m not sure that boolean true is evaluated as tru.</p>
<p>Try this in FireFox with FireBug installed</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4932' value='Select Code' data-codeid='sfcode4932' /></p>
<div class='sfcode' id='sfcode4932'>
<p>var editMessage = function(response,postdata){<br />&#160;&#160;&#160; json&#160;&#160; = response.responseText; // response text is returned from server.<br />&#160;&#160;&#160; var result = JSON.parse(json); // convert json object into javascript object</p>
<p>&#160;&#160;&#160; console.log(result);<br />&#160;&#160;&#160; return [result.status,result.message,null];<br />}</p>
</p>
</div>
<p>Regards</p>
]]></description>
        	        	<pubDate>Thu, 11 Oct 2012 17:47:45 +0300</pubDate>
        </item>
        <item>
        	<title>sebastiancb on Show errors</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/show-errors#p27493</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/show-errors#p27493</guid>
        	        	<description><![CDATA[<p>Hello, please, I need to show errors from my database mysql , for example &#39;Duplicate entry&#39; or &#39;Already exists&#39; in XML, because I have the way to show errors in JSON but I need to do it in XML.</p>
</p>
<p>Source code:</p>
<p><strong>Javascript</strong></p>
<p>var json;<br />var editMessage = function(response,postdata){<br />&#160;&#160;&#160; json&#160;&#160; = response.responseText; // response text is returned from server.<br />&#160;&#160;&#160; var result = JSON.parse(json); // convert json object into javascript object<br />&#160;&#160;&#160; return [result.status,result.message,null];<br />}<br />//--------------------------------------<br />jQuery.jgrid.edit = {<br />editCaption: "Editar",<br />bSubmit: "Guardar",<br />bCancel: "Cerrar",<br />closeAfterEdit:true,<br />reloadAfterSubmit:true,<br />processData: "Processing...",<br />msg:{required:"El campo es obligatorio"},<br />afterSubmit:editMessage<br />};</p>
</p>
<p><strong>PHP</strong></p>
<p>$message="Duplicate Entry";</p>
<p>$output[&#39;status&#39;]&#160; = false;<br />$output[&#39;message&#39;] = $message;<br />echo json_encode($output);</p></p>
]]></description>
        	        	<pubDate>Sun, 07 Oct 2012 01:46:39 +0300</pubDate>
        </item>
</channel>
</rss>