<?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 Open Programming Laboratory</title>
	<atom:link href="http://www.oplabo.com/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://www.oplabo.com</link>
	<description>I'm making programs using PHP and Zend Framework</description>
	<pubDate>Fri, 19 Mar 2010 20:51:21 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Validation of Zend_Form(Ajax version) by Sathesh</title>
		<link>http://www.oplabo.com/article/36/comment-page-1#comment-7651</link>
		<dc:creator>Sathesh</dc:creator>
		<pubDate>Thu, 31 Dec 2009 01:20:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.oplabo.com/?p=36#comment-7651</guid>
		<description>Thanks for the tutorial. It's great. 

Prototype people read this:

For the people who wish to do the same thing in prototype JS, add these lines when you receive the response (the prototype AJAX request will be regular one and need no special modifications), 

var response = t.responseText.evalJSON();
json = eval( '(' + response + ')' );

and then change all the 'dojo.byId' to $ . That's it. Hope this will be useful to someone. 

Thanks,

Sathesh</description>
		<content:encoded><![CDATA[							<p>Thanks for the tutorial. It&#8217;s great. </p>
							<p>Prototype people read this:</p>
							<p>For the people who wish to do the same thing in prototype JS, add these lines when you receive the response (the prototype AJAX request will be regular one and need no special modifications), </p>
							<p>var response = t.responseText.evalJSON();<br />
							json = eval( &#8216;(&#8217; + response + &#8216;)&#8217; );</p>
							<p>and then change all the &#8216;dojo.byId&#8217; to $ . That&#8217;s it. Hope this will be useful to someone. </p>
							<p>Thanks,</p>
							<p>Sathesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Validation of Zend_Form(Ajax version) by Mat</title>
		<link>http://www.oplabo.com/article/36/comment-page-1#comment-6129</link>
		<dc:creator>Mat</dc:creator>
		<pubDate>Thu, 03 Sep 2009 22:55:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.oplabo.com/?p=36#comment-6129</guid>
		<description>Hello oplabo,

In echo to what elGringo wrote, I'm getting a hard time understanding when the form is actually processed once it's validated. On the client side, an 'OK' message is displayed.
But when does the server process the data to perform actions on it?

In your example, the profileAction() method of the controller is only called once at the beginning, and is never called when all the fields are validated.

Am I missing something?</description>
		<content:encoded><![CDATA[							<p>Hello oplabo,</p>
							<p>In echo to what elGringo wrote, I&#8217;m getting a hard time understanding when the form is actually processed once it&#8217;s validated. On the client side, an &#8216;OK&#8217; message is displayed.<br />
							But when does the server process the data to perform actions on it?</p>
							<p>In your example, the profileAction() method of the controller is only called once at the beginning, and is never called when all the fields are validated.</p>
							<p>Am I missing something?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Dojo Widget with Zend_Form by oplabo</title>
		<link>http://www.oplabo.com/article/38/comment-page-1#comment-5964</link>
		<dc:creator>oplabo</dc:creator>
		<pubDate>Wed, 26 Aug 2009 14:14:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.oplabo.com/?p=38#comment-5964</guid>
		<description>Thank you for your good advice, and latest information.</description>
		<content:encoded><![CDATA[							<p>Thank you for your good advice, and latest information.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Multi Page Form that extends Zend_Form by oplabo</title>
		<link>http://www.oplabo.com/article/27/comment-page-1#comment-5963</link>
		<dc:creator>oplabo</dc:creator>
		<pubDate>Wed, 26 Aug 2009 14:13:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.oplabo.com/?p=27#comment-5963</guid>
		<description>I'm sorry, but I created the program with the following php configuration.
error_reporting  =  E_ALL &#38; ~E_NOTICE

If you can change your php.ini, please change it.</description>
		<content:encoded><![CDATA[							<p>I&#8217;m sorry, but I created the program with the following php configuration.<br />
							error_reporting  =  E_ALL &amp; ~E_NOTICE</p>
							<p>If you can change your php.ini, please change it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Multi Page Form that extends Zend_Form by Patrick</title>
		<link>http://www.oplabo.com/article/27/comment-page-1#comment-5932</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Mon, 24 Aug 2009 23:21:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.oplabo.com/?p=27#comment-5932</guid>
		<description>I am having these errors when I run you sample: 

Strict Standards: Declaration of Mylib_Form_MultiPage::setDefaults() should be compatible with that of Zend_Form::setDefaults() in C:\Inetpub\wwwroot\library\Mylib\Form\MultiPage.php on line 202

Strict Standards: Declaration of Mylib_Controller_MultiPage::_executeFind() should be compatible with that of Mylib_Controller_Simple::_executeFind() in C:\Inetpub\wwwroot\library\Mylib\Controller\MultiPage.php on line 6

Notice: Undefined index: Profiles in C:\Inetpub\wwwroot\library\Mylib\Form\MultiPage.php on line 37

I just want this same functionality on the demo page. Maybe I downloaded the wrong codes.

Any assistance would be appreciated. 

Thanks</description>
		<content:encoded><![CDATA[							<p>I am having these errors when I run you sample: </p>
							<p>Strict Standards: Declaration of Mylib_Form_MultiPage::setDefaults() should be compatible with that of Zend_Form::setDefaults() in C:\Inetpub\wwwroot\library\Mylib\Form\MultiPage.php on line 202</p>
							<p>Strict Standards: Declaration of Mylib_Controller_MultiPage::_executeFind() should be compatible with that of Mylib_Controller_Simple::_executeFind() in C:\Inetpub\wwwroot\library\Mylib\Controller\MultiPage.php on line 6</p>
							<p>Notice: Undefined index: Profiles in C:\Inetpub\wwwroot\library\Mylib\Form\MultiPage.php on line 37</p>
							<p>I just want this same functionality on the demo page. Maybe I downloaded the wrong codes.</p>
							<p>Any assistance would be appreciated. </p>
							<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Dojo Widget with Zend_Form by Max</title>
		<link>http://www.oplabo.com/article/38/comment-page-1#comment-5800</link>
		<dc:creator>Max</dc:creator>
		<pubDate>Tue, 18 Aug 2009 19:55:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.oplabo.com/?p=38#comment-5800</guid>
		<description>You should render your form before the viewscript then all you need to do is a:
if ($this-&#62;dojo()-&#62;isEnabled()){
	echo $this-&#62;dojo();
}

And you skip the part with the dojo.require() etc. I would also stress the importance of giving the form a unique name to allow programmatic initialization (as correctly provided in the tutorial).</description>
		<content:encoded><![CDATA[							<p>You should render your form before the viewscript then all you need to do is a:<br />
							if ($this-&gt;dojo()-&gt;isEnabled()){<br />
								echo $this-&gt;dojo();<br />
							}</p>
							<p>And you skip the part with the dojo.require() etc. I would also stress the importance of giving the form a unique name to allow programmatic initialization (as correctly provided in the tutorial).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Relation Table with Zend Framework by Srinivasan</title>
		<link>http://www.oplabo.com/article/35/comment-page-1#comment-5479</link>
		<dc:creator>Srinivasan</dc:creator>
		<pubDate>Wed, 05 Aug 2009 14:19:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.oplabo.com/?p=35#comment-5479</guid>
		<description>Hi,

Any one can confirm that self::CASCADE ondelete , onupdate is working on Zend Framework? or any one can guide me that how can i do that?

Thank you,
K.Srinivasan</description>
		<content:encoded><![CDATA[							<p>Hi,</p>
							<p>Any one can confirm that self::CASCADE ondelete , onupdate is working on Zend Framework? or any one can guide me that how can i do that?</p>
							<p>Thank you,<br />
							K.Srinivasan</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Creating Fields Comparison Validator for Zend_Form by midix</title>
		<link>http://www.oplabo.com/article/22/comment-page-1#comment-5149</link>
		<dc:creator>midix</dc:creator>
		<pubDate>Sat, 18 Jul 2009 11:06:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.oplabo.com/?p=22#comment-5149</guid>
		<description>Thanks, good one. 

There is only one problem: if I use it for passwords, the %key_value% is being replaced by a visible password text, not *****.

I added one more operation EQPSW and message MSG_NOT_EQPSW which does not show %key_value%.</description>
		<content:encoded><![CDATA[							<p>Thanks, good one. </p>
							<p>There is only one problem: if I use it for passwords, the %key_value% is being replaced by a visible password text, not *****.</p>
							<p>I added one more operation EQPSW and message MSG_NOT_EQPSW which does not show %key_value%.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Validation of Zend_Form(Ajax version) by oplabo</title>
		<link>http://www.oplabo.com/article/36/comment-page-1#comment-2254</link>
		<dc:creator>oplabo</dc:creator>
		<pubDate>Tue, 21 Apr 2009 08:53:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.oplabo.com/?p=36#comment-2254</guid>
		<description>I think it is difficult to use processAjax() in that case.
But you can replace all form elements like the following code.
(I'm not sure that it is practical.)
&lt;pre lang="php"&gt;
    // in the controller
    public function validate2Action()
    {
        $form = $this-&gt;getProfileForm();
        if ($this-&gt;getRequest()-&gt;isPost())
        {
            if ($form-&gt;isValid($_POST))
            {
                $this-&gt;_helper-&gt;json-&gt;sendJson(true);
            }
        }
        echo $form;
        exit;
    }
&lt;/pre&gt;
&lt;pre lang="php"&gt;
// in the script tag
// sumbit the form 
var formSubmit = function(e){
    // prevent the form from actually submitting
    e.preventDefault(); 
    // submit the form in the background    
    dojo.xhrPost({
//        url: "&lt;?=$this-&gt;url(array('action'=&gt;'validate'))?&gt;/format/json",
        url: "&lt;?=$this-&gt;url(array('action'=&gt;'validate2'))?&gt;",
        form: "profileForm",
//        handleAs: "json",
        handleAs: "text",
        handle: function(data,args){
            if(typeof data == "error")
            {
                console.warn("error!",args);
            }
            else if (data == "true")
            {
                alert("OK!");
            }
            else
            {
                var div = document.createElement("div");
                div.innerHTML = data;
                dojo.byId("profileForm").innerHTML = div.firstChild.innerHTML;
            }
        }
    });
};
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[							<p>I think it is difficult to use processAjax() in that case.<br />
							But you can replace all form elements like the following code.<br />
							(I&#8217;m not sure that it is practical.)</p>
							<pre lang="php">
    // in the controller
    public function validate2Action()
    {
        $form = $this->getProfileForm();
        if ($this->getRequest()->isPost())
        {
            if ($form->isValid($_POST))
            {
                $this->_helper->json->sendJson(true);
            }
        }
        echo $form;
        exit;
    }
</pre>
							<pre lang="php">
// in the script tag
// sumbit the form
var formSubmit = function(e){
    // prevent the form from actually submitting
    e.preventDefault();
    // submit the form in the background
    dojo.xhrPost({
//        url: "< ?=$this->url(array('action'=>'validate'))?>/format/json",
        url: "< ?=$this->url(array('action'=>'validate2'))?>",
        form: "profileForm",
//        handleAs: "json",
        handleAs: "text",
        handle: function(data,args){
            if(typeof data == "error")
            {
                console.warn("error!",args);
            }
            else if (data == "true")
            {
                alert("OK!");
            }
            else
            {
                var div = document.createElement("div");
                div.innerHTML = data;
                dojo.byId("profileForm").innerHTML = div.firstChild.innerHTML;
            }
        }
    });
};
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Creating Custom Validators by oplabo</title>
		<link>http://www.oplabo.com/article/13/comment-page-1#comment-2251</link>
		<dc:creator>oplabo</dc:creator>
		<pubDate>Tue, 21 Apr 2009 06:27:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.oplabo.com/?p=13#comment-2251</guid>
		<description>Thank you for your suggestion.</description>
		<content:encoded><![CDATA[							<p>Thank you for your suggestion.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
