<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Rojak Coder</title>
	<atom:link href="http://www.rojakcoder.com/wordpress/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rojakcoder.com/wordpress</link>
	<description>Of Linux, Programming, and Singaporean Ramblings</description>
	<lastBuildDate>Wed, 01 Sep 2010 16:18:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Using Zend Framework with jQuery to do Auto-Completion by cheeze</title>
		<link>http://www.rojakcoder.com/wordpress/2009/01/08/using-zend-framework-with-jquery-to-do-auto-completion/comment-page-1/#comment-4572</link>
		<dc:creator>cheeze</dc:creator>
		<pubDate>Wed, 01 Sep 2010 16:18:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.rojakcoder.com/wordpress/?p=68#comment-4572</guid>
		<description>Hi. I think I know what is your problem. Before I give my thoughts (suspense, suspense :) I have a few questions about your view. There is no opening &lt;?php tag in your sample. I suppose you left it out here but is there in your actual code?
Also, the syntax

words as $word)

is foreign to me. Is it a different form of expression?

Finally, the answer to your question. I guess you are viewing the page also at the same URL http://mie.com/autocompletar/index?
If so, you need to place your Javascript code and the textbox into index.phtml. The list of words that responds to your AJAX call will have to be placed in index.ajax.phtml. In this view, the list of words needs to be placed in a newline each. That&#039;s why there is the foreach loop in the view script in my example.

The reason why there is a need for two view scripts is that the one ending in ajax.phtml is used to respond to AJAX requests while the one ending in phtml is for normal HTTP requests.

So basically the reason you are seeing the error is that you never got to your index page as the &quot;normal&quot; view script is not present.

I hope my explanation is clear. Feel free to post back if you need more clarification.</description>
		<content:encoded><![CDATA[<p>Hi. I think I know what is your problem. Before I give my thoughts (suspense, suspense <img src='http://www.rojakcoder.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I have a few questions about your view. There is no opening &lt;?php tag in your sample. I suppose you left it out here but is there in your actual code?<br />
Also, the syntax</p>
<p>words as $word)</p>
<p>is foreign to me. Is it a different form of expression?</p>
<p>Finally, the answer to your question. I guess you are viewing the page also at the same URL <a href="http://mie.com/autocompletar/index?" rel="nofollow">http://mie.com/autocompletar/index?</a><br />
If so, you need to place your Javascript code and the textbox into index.phtml. The list of words that responds to your AJAX call will have to be placed in index.ajax.phtml. In this view, the list of words needs to be placed in a newline each. That&#039;s why there is the foreach loop in the view script in my example.</p>
<p>The reason why there is a need for two view scripts is that the one ending in ajax.phtml is used to respond to AJAX requests while the one ending in phtml is for normal HTTP requests.</p>
<p>So basically the reason you are seeing the error is that you never got to your index page as the &quot;normal&quot; view script is not present.</p>
<p>I hope my explanation is clear. Feel free to post back if you need more clarification.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Zend Framework with jQuery to do Auto-Completion by sbetza</title>
		<link>http://www.rojakcoder.com/wordpress/2009/01/08/using-zend-framework-with-jquery-to-do-auto-completion/comment-page-1/#comment-4543</link>
		<dc:creator>sbetza</dc:creator>
		<pubDate>Thu, 26 Aug 2010 15:48:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.rojakcoder.com/wordpress/?p=68#comment-4543</guid>
		<description>Sorry This line is wrong, the rest of the code is correct.

&quot;words as $word):
?&gt;&quot;</description>
		<content:encoded><![CDATA[<p>Sorry This line is wrong, the rest of the code is correct.</p>
<p>&#8220;words as $word):<br />
?&gt;&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Zend Framework with jQuery to do Auto-Completion by sbetza</title>
		<link>http://www.rojakcoder.com/wordpress/2009/01/08/using-zend-framework-with-jquery-to-do-auto-completion/comment-page-1/#comment-4542</link>
		<dc:creator>sbetza</dc:creator>
		<pubDate>Thu, 26 Aug 2010 15:44:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.rojakcoder.com/wordpress/?p=68#comment-4542</guid>
		<description>Hi cheeze,

Thanks for your help. 
My controller has the follow (the name is: AutocompletarController.php):

class AutocompletarController extends Zend_Controller_Action
{
    public function init()
    {	 $this-&gt;_helper-&gt;ajaxContext()-&gt;addActionContext(&#039;index&#039;,&#039;html&#039;)-&gt;initContext();
        parent::init();
    }
    public function indexAction()
    {	if($this-&gt;_helper-&gt;ajaxContext()-&gt;getCurrentContext())
 {
			 $this-&gt;view-&gt;words = array(&#039;leon&#039;, &#039;lionel&#039;, &#039;Lenny&#039;, &#039;Linda&#039;, &#039;Lindy&#039;);
		}
}

The index.ajax.phtml has the follow:


$(document).ready(function() {
    $(&#039;#username&#039;).autocompleteArray(&#039;http://www.mie.com/autocompletar/index/format/html&#039;);
});


words as $word):
?&gt;

&lt;input type=&quot;text&quot; name=&quot;username&quot; id=&quot;username&quot; value=&quot;&quot;/&gt;



I have another question, Can I change the array &quot;words&quot; for a query?

I hope for your soon answers.
Thanks.</description>
		<content:encoded><![CDATA[<p>Hi cheeze,</p>
<p>Thanks for your help.<br />
My controller has the follow (the name is: AutocompletarController.php):</p>
<p>class AutocompletarController extends Zend_Controller_Action<br />
{<br />
    public function init()<br />
    {	 $this-&gt;_helper-&gt;ajaxContext()-&gt;addActionContext(&#8216;index&#8217;,'html&#8217;)-&gt;initContext();<br />
        parent::init();<br />
    }<br />
    public function indexAction()<br />
    {	if($this-&gt;_helper-&gt;ajaxContext()-&gt;getCurrentContext())<br />
 {<br />
			 $this-&gt;view-&gt;words = array(&#8216;leon&#8217;, &#8216;lionel&#8217;, &#8216;Lenny&#8217;, &#8216;Linda&#8217;, &#8216;Lindy&#8217;);<br />
		}<br />
}</p>
<p>The index.ajax.phtml has the follow:</p>
<p>$(document).ready(function() {<br />
    $(&#8216;#username&#8217;).autocompleteArray(&#8216;http://www.mie.com/autocompletar/index/format/html&#8217;);<br />
});</p>
<p>words as $word):<br />
?&gt;</p>
<p>&lt;input type=&quot;text&quot; name=&quot;username&quot; id=&quot;username&quot; value=&quot;&#8221;/&gt;</p>
<p>I have another question, Can I change the array &#8220;words&#8221; for a query?</p>
<p>I hope for your soon answers.<br />
Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Zend Framework with jQuery to do Auto-Completion by cheeze</title>
		<link>http://www.rojakcoder.com/wordpress/2009/01/08/using-zend-framework-with-jquery-to-do-auto-completion/comment-page-1/#comment-4541</link>
		<dc:creator>cheeze</dc:creator>
		<pubDate>Thu, 26 Aug 2010 13:56:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.rojakcoder.com/wordpress/?p=68#comment-4541</guid>
		<description>Hi. Without a lot of information, I&#039;m unable to pinpoint where the error might be. Having said that, I would look at a few places.

Have you inserted the init() function in your controller? That is needed to initiate the the script for AJAX.

Albeit fairly obvious, I assume you&#039;ve checked the spelling (cos completar is not a word, although I guess you did that on purpose?) 

If you could provide more info, I&#039;d be able to help more.</description>
		<content:encoded><![CDATA[<p>Hi. Without a lot of information, I&#8217;m unable to pinpoint where the error might be. Having said that, I would look at a few places.</p>
<p>Have you inserted the init() function in your controller? That is needed to initiate the the script for AJAX.</p>
<p>Albeit fairly obvious, I assume you&#8217;ve checked the spelling (cos completar is not a word, although I guess you did that on purpose?) </p>
<p>If you could provide more info, I&#8217;d be able to help more.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Zend Framework with jQuery to do Auto-Completion by sbetza</title>
		<link>http://www.rojakcoder.com/wordpress/2009/01/08/using-zend-framework-with-jquery-to-do-auto-completion/comment-page-1/#comment-4540</link>
		<dc:creator>sbetza</dc:creator>
		<pubDate>Thu, 26 Aug 2010 12:55:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.rojakcoder.com/wordpress/?p=68#comment-4540</guid>
		<description>Hi everybody,

I was reading the tutorial, I do every step but it doesn&#039;t work. The problem is when I change the index.phtml for index.ajax.phtml, the error message is :
Message: script &#039;autocompletar/index.phtml&#039; not found in path (/var/www/proyectos/application/views/scripts/) .

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi everybody,</p>
<p>I was reading the tutorial, I do every step but it doesn&#8217;t work. The problem is when I change the index.phtml for index.ajax.phtml, the error message is :<br />
Message: script &#8216;autocompletar/index.phtml&#8217; not found in path (/var/www/proyectos/application/views/scripts/) .</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on MySQL Error 1452 by cheeze</title>
		<link>http://www.rojakcoder.com/wordpress/2008/12/17/mysql-error-1452/comment-page-1/#comment-4442</link>
		<dc:creator>cheeze</dc:creator>
		<pubDate>Thu, 12 Aug 2010 14:48:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.rojakcoder.com/wordpress/?p=57#comment-4442</guid>
		<description>Hi Pravin,

Unfortunately, there is no standard way to determine the issue. I was lucky to have thought of the cause of the problem in my case.

For your situation, you mentioned that you had tried to do the same thing in the MySQL console, it worked but when doing it with C# it doesn&#039;t.

What I would do is first determine if both are working on the same records. Because the type of data in the table is important. Have you recently changed the schema of your tables? That is what I will look at too.

That&#039;s about all I can help you with. I don&#039;t have much knowledge about stored procedures nor C#.

Good luck!</description>
		<content:encoded><![CDATA[<p>Hi Pravin,</p>
<p>Unfortunately, there is no standard way to determine the issue. I was lucky to have thought of the cause of the problem in my case.</p>
<p>For your situation, you mentioned that you had tried to do the same thing in the MySQL console, it worked but when doing it with C# it doesn&#8217;t.</p>
<p>What I would do is first determine if both are working on the same records. Because the type of data in the table is important. Have you recently changed the schema of your tables? That is what I will look at too.</p>
<p>That&#8217;s about all I can help you with. I don&#8217;t have much knowledge about stored procedures nor C#.</p>
<p>Good luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on MySQL Error 1452 by Pravin</title>
		<link>http://www.rojakcoder.com/wordpress/2008/12/17/mysql-error-1452/comment-page-1/#comment-4429</link>
		<dc:creator>Pravin</dc:creator>
		<pubDate>Wed, 11 Aug 2010 08:40:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.rojakcoder.com/wordpress/?p=57#comment-4429</guid>
		<description>Dear,
My question us slightly different from the discussion what u have had above...
i am using mysql server 5.0 and c# .Net  3.5
i have one store procedure to update member profile.. the problem is that when i m trying to execute code to update member profile it is showing exception that &quot;Cannot add or update a child row: a foreign key constraint fails &quot; while updating certain parameter which have foreign references ... but when i m trying to execute store procedure in database side .. it is working fine... i m not able to find why this is happening .. that sp is executing at DB side and which is throwing exception on application side ...
pls guide me for this problem...
Thanks</description>
		<content:encoded><![CDATA[<p>Dear,<br />
My question us slightly different from the discussion what u have had above&#8230;<br />
i am using mysql server 5.0 and c# .Net  3.5<br />
i have one store procedure to update member profile.. the problem is that when i m trying to execute code to update member profile it is showing exception that &#8220;Cannot add or update a child row: a foreign key constraint fails &#8221; while updating certain parameter which have foreign references &#8230; but when i m trying to execute store procedure in database side .. it is working fine&#8230; i m not able to find why this is happening .. that sp is executing at DB side and which is throwing exception on application side &#8230;<br />
pls guide me for this problem&#8230;<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Zend Framework with jQuery to do Auto-Completion by jQuery autocomplete &#124; Webdesgin</title>
		<link>http://www.rojakcoder.com/wordpress/2009/01/08/using-zend-framework-with-jquery-to-do-auto-completion/comment-page-1/#comment-4301</link>
		<dc:creator>jQuery autocomplete &#124; Webdesgin</dc:creator>
		<pubDate>Sun, 18 Jul 2010 18:03:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.rojakcoder.com/wordpress/?p=68#comment-4301</guid>
		<description>[...] http://www.rojakcoder.com/wordpress/2009/01/08/using-zend-framework-with-jquery-to-do-auto-completio...        Tags: ajax, autocomplete, suggestion box Kategorie: PHP, jQuery Top [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.rojakcoder.com/wordpress/2009/01/08/using-zend-framework-with-jquery-to-do-auto-completio.." rel="nofollow">http://www.rojakcoder.com/wordpress/2009/01/08/using-zend-framework-with-jquery-to-do-auto-completio..</a>.        Tags: ajax, autocomplete, suggestion box Kategorie: PHP, jQuery Top [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Zend Framework with jQuery to do Auto-Completion by Justin</title>
		<link>http://www.rojakcoder.com/wordpress/2009/01/08/using-zend-framework-with-jquery-to-do-auto-completion/comment-page-1/#comment-4188</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Wed, 16 Jun 2010 13:49:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.rojakcoder.com/wordpress/?p=68#comment-4188</guid>
		<description>Thanks for the tutorial. Can you explain how i can get the values to be displayed in the autocomplete field from a database with a simple example? I&#039;m new to zend and i&#039;d appreciate any help. Thanks!</description>
		<content:encoded><![CDATA[<p>Thanks for the tutorial. Can you explain how i can get the values to be displayed in the autocomplete field from a database with a simple example? I&#8217;m new to zend and i&#8217;d appreciate any help. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Zend Framework with jQuery to do Auto-Completion by cheeze</title>
		<link>http://www.rojakcoder.com/wordpress/2009/01/08/using-zend-framework-with-jquery-to-do-auto-completion/comment-page-1/#comment-4169</link>
		<dc:creator>cheeze</dc:creator>
		<pubDate>Thu, 10 Jun 2010 14:53:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.rojakcoder.com/wordpress/?p=68#comment-4169</guid>
		<description>@zygis

The $ is a defined variable in jQuery. The error occurs because you have not included jQuery.

There are a few ways you can enable jQuery, but I guess the easiest way for you to understand is to use the same method to include the jQuery library like so:

$view-&gt;jQuery()-&gt;addJavascriptFile(&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;);</description>
		<content:encoded><![CDATA[<p>@zygis</p>
<p>The $ is a defined variable in jQuery. The error occurs because you have not included jQuery.</p>
<p>There are a few ways you can enable jQuery, but I guess the easiest way for you to understand is to use the same method to include the jQuery library like so:</p>
<p>$view->jQuery()->addJavascriptFile(&#8220;https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&#8221;);</p>
]]></content:encoded>
	</item>
</channel>
</rss>
