<?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: calling a jqgrid via ajax</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/calling-a-jqgrid-via-ajax</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/calling-a-jqgrid-via-ajax/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>dancombs on calling a jqgrid via ajax</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/calling-a-jqgrid-via-ajax#p26649</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/calling-a-jqgrid-via-ajax#p26649</guid>
        	        	<description><![CDATA[<p>If I include this in a php file, it works nicely.</p>
<p>&#60;body&#62;<br />&#60;?php include "myfirstgrid.php" ?&#62;<br />&#60;/body&#62;<br />&#60;/html&#62;</p>
<p>I want to use a select box to choose an item from a list then call the jqgrid php file "myfirstgrid.php". The select works perfectly, calling "squdrons.php" and populating the select list. When the select chooses an item (which works) I want to fill "#bot" with the jqgrid (which doesn&#39;t work). The reason for the select list is I want to modify what "myfirstgrid.php" sends back from the server based on the selection.&#160; This is what I currently have which doesn&#39;t populate "#bot" with the jqgrid.</p>
<p>&#60;body&#62;<br />&#160;&#160;&#160;&#160;&#160; &#60;select size="1" id="squadronList"&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;option&#62;Select a Navy squadron&#60;/option&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;?php include "squadrons.php" ?&#62;<br />&#160;&#160;&#160;&#160;&#160; &#60;/select&#62;<br />&#60;div id="top"&#62;&#60;/div&#62;<br />&#60;div id="bot"&#62;&#60;/div&#62;<br />&#160; &#60;script type="text/javascript"&#62;<br />&#160;&#160;&#160; $("select").change(function () {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var str = "";<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("select option:selected").each(function () {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; str = $(this).val();<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; $("#top").text(str); // this works<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; });<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; })<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; .change();<br />&#160; &#60;/script&#62;<br />&#60;script&#62;<br />$("#squadronList").bind("change", function() {<br />&#160; var uic = $("#squadronList").val();<br />&#160; $("#bot").text(function() {<br />&#160; &#160;&#160; &#160;$.get("myfirstgrid.php");<br />&#160; &#160;&#160; &#160;});<br />});</p>
<p>&#60;/script&#62;</p>
]]></description>
        	        	<pubDate>Wed, 23 May 2012 20:07:56 +0300</pubDate>
        </item>
</channel>
</rss>