<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Implementing Approval Method Related to AJAX in FA]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=2178</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=2178&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Implementing Approval Method Related to AJAX in FA.]]></description>
		<lastBuildDate>Wed, 04 Jul 2012 04:53:53 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Implementing Approval Method Related to AJAX in FA]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=12835#p12835</link>
			<description><![CDATA[<p>hi bhoo-day,<br />how is your code? does janusz reply solve your problem?<br />i just searching approval module in many step in purchasing, sale, etc. <br />i hope bhoo-day can spread the code if it&#039;s good result.</p>]]></description>
			<author><![CDATA[null@example.com (jojobbing)]]></author>
			<pubDate>Wed, 04 Jul 2012 04:53:53 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=12835#p12835</guid>
		</item>
		<item>
			<title><![CDATA[Re: Implementing Approval Method Related to AJAX in FA]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=9571#p9571</link>
			<description><![CDATA[<p>Try use div_start(&#039;buttons&#039;), div_end() instead of &lt;p&gt; tags.<br />Paragraph tags need additional coding to make it working (see div_start/end code in ui_controls.inc).<br />Janusz</p>]]></description>
			<author><![CDATA[null@example.com (itronics)]]></author>
			<pubDate>Wed, 29 Jun 2011 08:45:39 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=9571#p9571</guid>
		</item>
		<item>
			<title><![CDATA[Implementing Approval Method Related to AJAX in FA]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=9526#p9526</link>
			<description><![CDATA[<p>Hello everybody, </p><p>I&#039;m developing a custom module for budgeting usage. There is a approval feature to determine whether the budgeting usage is okay or not. <br />The problem I faced is I can&#039;t hide the approval button after I press the button and the Ajax run. The approval button is still there and I also can&#039;t display the notifications. </p><p>Here is my snippet codes<br /></p><div class="codebox"><pre><code>if($_POST[&#039;approve&#039;])
{
    $budget_usage_id = $_POST[&#039;budget_usage_id&#039;];
    
    approve_budget_usage($budget_usage_id);       
    
    display_notification_centered(_(&quot;The Budget usage has been approved.&quot;));  // Can&#039;t display it

    $_POST[&#039;approved&#039;] = &#039;1&#039;; // Approved

    $Ajax-&gt;activate(&#039;buttons&#039;);  // Should I use ajax here??
    
}</code></pre></div><p>For display<br /></p><div class="codebox"><pre><code>        &lt;p id=&quot;buttons&quot; style=&quot;text-align: center&quot;&gt;
        &lt;?php if($_POST[&#039;approved&#039;] == &#039;0&#039;): ?&gt; // Cek if the budget is approved or not
                &lt;?php submit(&#039;approve&#039;, _(&quot;Approve&quot;), true, &#039;&#039;, &#039;default&#039;); ?&gt;
        &lt;?php endif; ?&gt;
        &lt;/p&gt;     </code></pre></div><p>I&#039;m still curious about it even though I can use JQuery for it but it could be great if I can use Ajax from FA. </p><p>Thanks.</p>]]></description>
			<author><![CDATA[null@example.com (bhoo-day)]]></author>
			<pubDate>Fri, 24 Jun 2011 04:16:07 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=9526#p9526</guid>
		</item>
	</channel>
</rss>
