<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — How to include checkbox in Table Pager]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=6065</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=6065&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to include checkbox in Table Pager.]]></description>
		<lastBuildDate>Tue, 16 Feb 2016 03:29:32 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How to include checkbox in Table Pager]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25201#p25201</link>
			<description><![CDATA[<p>As the db_pager_view.inc is a core file, modifying it may not be good. Checking the file that @joe suggested may be useful.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Tue, 16 Feb 2016 03:29:32 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25201#p25201</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to include checkbox in Table Pager]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25193#p25193</link>
			<description><![CDATA[<p>currently, it works fine when clicking and staying in any table page</p><p>but when changing the page still there is a problem to be resolved.</p><p>//-------------------------------------------------------------------------------------------------------------------------<br />//&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;the bellow sequence is very important for controlling the checkboxes relation header / rows<br />//-------------------------------------------------------------------------------------------------------------------------<br />&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; <br />$id = find_submit(&#039;_rec_&#039;);&nbsp; &nbsp; &nbsp; // check if a row was clicked</p><p>if (!check_value(&#039;chkbx&#039;)) { update_all(&#039;0&#039;) ;&nbsp; }&nbsp; &nbsp;// always clear all the rows checkboxes whenever the header is not marked</p><p>if ( check_value(&#039;chkbx&#039;)==1 &amp;&amp; $id == -1) { update_all(&#039;1&#039;) ;&nbsp; }&nbsp; // when we are sure that the header is<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; clicked and not one of the rows was clicked<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />if ($id != -1)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // when a row is clicked =&gt; toggle its mark &amp; update the &quot;sel_chk&quot; field to (0 || 1 )<br />&nbsp; &nbsp; &nbsp; &nbsp; { <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $chkbox_value = check_value(&quot;rec_&quot;.$id) ? &#039;1&#039; : &#039;0&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; update_gl_trans_sel_chk_value($id,$chkbox_value);<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>//--------------------------------------------------------------------------------------------------------------------------<br />//&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;the above sequence is very important for controlling the checkboxes relation header / rows<br />//--------------------------------------------------------------------------------------------------------------------------</p><br /><p>I m sure now that things are on the right track.</p><p>- the goods is I didn&#039;t use javascripts until now except of the standard ((( JsHttpRequest.request(&quot;_XXXX_update&quot;, this.form); )))</p><p>- the bads is that I was obliged to control the header checkbox through modifications in db_pager_view.inc file: </p><p>related to&nbsp; &nbsp;:&nbsp; &nbsp; $labels[0]&nbsp; &nbsp;&lt;==&gt;&nbsp; $table-&gt;columns-&gt;headers[0]&nbsp; &nbsp;( table header )</p><br /><p>thanks for your support</p><p>Khaled</p>]]></description>
			<author><![CDATA[null@example.com (Kalido)]]></author>
			<pubDate>Sun, 14 Feb 2016 21:46:53 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25193#p25193</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to include checkbox in Table Pager]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25187#p25187</link>
			<description><![CDATA[<p>Avoid sessions and keep the js local at the client side. Just toggle the state of the &quot;select all&quot; checkbox and on it&#039;s change based on it&#039;s current value, either populate or clear all target checkboxes and make sure the value of the &quot;select all&quot; checkbox is a blank string when submitting the form and it is to be ignored in the form processor.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sun, 14 Feb 2016 05:56:01 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25187#p25187</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to include checkbox in Table Pager]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25185#p25185</link>
			<description><![CDATA[<p>Hi,</p><p>to resolve the checkboxes select/deselect in the rows, I did the following :</p><p>- I added a temporary field column &quot;sel_chk&quot; to the $sql used in journal_inquiry ( based on adding join the existing &quot;gl_trans&quot; to temporary table containing [ clone of gl_trans.counter &amp; sel_chk] </p><p>- I controlled their previous selection&nbsp; within the $sql pagination by adding a $_session var for the journal_inquiry page &amp; by adding a conditional check in db_pager_view.inc </p><p>- I imitate the selection checkboxes as in : /gl/bank_account_reconcile.php and it works ok for the rows.</p><br /><p>Now for doing the check ALL case in the deader i m freezed:</p><p>- I cannot adopt the JAVASCRIPT approach as in the links because it deals with the seen page only, and when paginating it flashes away all the checkboxes ( I tried as described )</p><p>- I tried to call a php function through AJAX ( it looks a good approach ) but i failed because it seems that in this JAVA / AJAX / PHP connection, JAVSCRIPT establish a new connection tunnel for the communication and in this case it couldn&#039;t recognize all of the server original environment and and the relations were lost.</p><p>it is really a difficult exercise.</p><p>khaled</p>]]></description>
			<author><![CDATA[null@example.com (Kalido)]]></author>
			<pubDate>Sat, 13 Feb 2016 18:57:01 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25185#p25185</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to include checkbox in Table Pager]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25173#p25173</link>
			<description><![CDATA[<p>When done, please submit patches here for peer review and possible inclusion in FA 2.4.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Wed, 10 Feb 2016 13:03:00 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25173#p25173</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to include checkbox in Table Pager]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25171#p25171</link>
			<description><![CDATA[<p>Thanks for your reply.</p><p>Khaled</p>]]></description>
			<author><![CDATA[null@example.com (Kalido)]]></author>
			<pubDate>Wed, 10 Feb 2016 11:11:42 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25171#p25171</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to include checkbox in Table Pager]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25167#p25167</link>
			<description><![CDATA[<p>The current implementation of the&quot;X&quot; in the checkbox column header is not designed to work as expected by you - in fact it does not have js attached to it.</p><p>Reference implementations are available at:<br /><a href="http://stackoverflow.com/questions/19282219/check-uncheck-all-the-checkboxes-in-a-table">http://stackoverflow.com/questions/1928 … in-a-table</a><br />and<br /><a href="http://stackoverflow.com/questions/386281/how-to-implement-select-all-check-box-in-html">http://stackoverflow.com/questions/3862 … ox-in-html</a></p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Wed, 10 Feb 2016 05:41:41 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25167#p25167</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to include checkbox in Table Pager]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25162#p25162</link>
			<description><![CDATA[<p>Hi Joe,</p><p>Controlling the checkboxes in the tables rows are ok now ( learned how to do it from : bank_account_reconcile.php ), </p><p>but still I failed to control the top checkbox in their column header.</p><p>The idea is to use it as : check all / uncheck all / checked (whenever one of the rows checkboxes is checked)</p><p>AND whenever the header is being checked a tiny icon menu will&nbsp; show up ( and this tiny menu will disappear when unchecked ).</p><p>Any suggestion ?</p><p>Regards,<br />Kalido</p>]]></description>
			<author><![CDATA[null@example.com (Kalido)]]></author>
			<pubDate>Tue, 09 Feb 2016 18:20:57 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25162#p25162</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to include checkbox in Table Pager]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25074#p25074</link>
			<description><![CDATA[<p>Hi, </p><p>I couldn&#039;t understand your comment, but I attached the pic to help figure out what i am working on.</p><p>Anyhow I appreciate any help in this regard.</p><p>I did a deep search for a solution on the net, but it seems it is a bit complicated to have such kind of control and I found nothing interesting unless advises to use $_session ( cookies ) when paginating to hold control of checked checkboxes.</p><p>I didn&#039;t found any sample to base my trials on it and because of that I tried to ask for suggestions.</p><p>For sure there is no selfishness when I said that I failed to do this exercise.&nbsp; &nbsp; <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>Thanks,<br />Kalido</p>]]></description>
			<author><![CDATA[null@example.com (Kalido)]]></author>
			<pubDate>Fri, 22 Jan 2016 22:52:22 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25074#p25074</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to include checkbox in Table Pager]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25035#p25035</link>
			<description><![CDATA[<p>Attached your screenshot here for self-sufficiency.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sun, 17 Jan 2016 02:14:59 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25035#p25035</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to include checkbox in Table Pager]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=25019#p25019</link>
			<description><![CDATA[<p>I will submit the code, but until now I failed to hold the checkbox&#039;s when activating AJAX.</p><p>I added the checkbox&#039;s to a new Journal Inquiry page and trying to control the selection for exporting or printing out.</p><p>Any proposal ?</p>]]></description>
			<author><![CDATA[null@example.com (Kalido)]]></author>
			<pubDate>Mon, 11 Jan 2016 16:23:41 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=25019#p25019</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to include checkbox in Table Pager]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=24957#p24957</link>
			<description><![CDATA[<p>Wouldn&#039;t you want to submit your code?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Thu, 24 Dec 2015 18:02:50 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=24957#p24957</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to include checkbox in Table Pager]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=24956#p24956</link>
			<description><![CDATA[<p>hey,</p><p>really i m thankful a lot.</p><p>Kalido</p>]]></description>
			<author><![CDATA[null@example.com (Kalido)]]></author>
			<pubDate>Tue, 22 Dec 2015 17:48:37 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=24956#p24956</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to include checkbox in Table Pager]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=24955#p24955</link>
			<description><![CDATA[<p>Thanks,</p><p>I m trying to have a new look for ..\gl\inquiry\journal_inquiry.php with which&nbsp; I want to add a new checkbox column at the beginning <br />of the displayed table.</p><p>When selecting checkbox&#039;s , it will popup a set of control buttons who will allow us to Export the selected rows.</p><p>It is a some kind of additional control to add for List inquiry web pages used in different locations of FA.</p><p>Kalido</p>]]></description>
			<author><![CDATA[null@example.com (Kalido)]]></author>
			<pubDate>Tue, 22 Dec 2015 17:41:54 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=24955#p24955</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to include checkbox in Table Pager]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=24954#p24954</link>
			<description><![CDATA[<p>Hello, <br />Yes it is possible. Please have a look into Search not invoiced deliveries in Sales tab.<br />Here you will se a column with checkboxes for batching the deliveries.<br />Maybe you can get an idea from here.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Tue, 22 Dec 2015 17:38:42 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=24954#p24954</guid>
		</item>
	</channel>
</rss>
