<?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: Help with custom function.</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/help-with-custom-function</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/help-with-custom-function/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>onlyjf on Help with custom function.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/help-with-custom-function#p15279</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/help-with-custom-function#p15279</guid>
        	        	<description><![CDATA[<p>Tanks a lot , Tony...</p>
]]></description>
        	        	<pubDate>Mon, 01 Mar 2010 21:26:31 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Help with custom function.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/help-with-custom-function#p15262</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/help-with-custom-function#p15262</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Here we are:</p>
<p>Set this in ajax in order to work:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7447' value='Select Code' data-codeid='sfcode7447' /></p>
<div class='sfcode' id='sfcode7447'>
<p>function usercheck(value,username){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $.ajax({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; type: "POST",</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong>async: false,</strong><br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url: "&#60;?=ROOT_PATH?&#62;/users/usercheck.php",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; data: {username:value},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; success: function(msg){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return [false,msg];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });<br />&#160;&#160;&#160; }</p>
</div>
<p>I lieve this to you to explain why?</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 01 Mar 2010 20:29:38 +0200</pubDate>
        </item>
        <item>
        	<title>onlyjf on Help with custom function.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/help-with-custom-function#p15207</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/help-with-custom-function#p15207</guid>
        	        	<description><![CDATA[<p>I want to use custom function to check some field like this.</p>
<p>/-------------------------------------------------------------------------------------------------------/</p>
<p>{name:&#39;username&#39;,index:&#39;username&#39;, width:80,align:"laft",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; editable:true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; formoptions:{rowpos:3},&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; editrules: {edithidden: true, required: true,custom:true,custom_func:usercheck},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; searchoptions: { sopt: [&#39;bw&#39;]}<br />&#160;},</p>
</p>
<p>function usercheck(value,username){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $.ajax({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; type: "POST",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url: "&#60;?=ROOT_PATH?&#62;/users/usercheck.php",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; data: {username:value},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; success: function(msg){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return [false,msg];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });<br />&#160;&#160;&#160; }</p>
<p>/-------------------------------------------------------------------------------------------------------/</p>
<p>usercheck.php</p>
<p>// db process</p>
<p>and than</p>
<p>if($soemcheck){</p>
<p>&#160;&#160;&#160; echo &#39;&#160; ""&#160; &#39;</p>
<p>}else{</p>
<p>&#160;&#160; echo &#39;&#160; "This id already taken.."&#160; &#39;</p>
<p>}</p>
<p>/-------------------------------------------------------------------------------------------------------/</p>
<p>When I do this. some message show me like this.</p>
<p>" Custom function should return array! "</p>
</p>
<p>If I do not use ajax, It working to check some field. but ajax is not working.</p>
</p>
<p>Tony, Please help me..</p>
</p>
<p>Thanks a lot...</p></p>
]]></description>
        	        	<pubDate>Sat, 27 Feb 2010 03:54:54 +0200</pubDate>
        </item>
</channel>
</rss>