<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — FA WITH AUTOCOMPLETE  DOWNLOAD]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=6198&amp;type=atom" />
	<updated>2022-04-21T15:17:45Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=6198</id>
		<entry>
			<title type="html"><![CDATA[Re: FA WITH AUTOCOMPLETE  DOWNLOAD]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=40907#p40907" />
			<content type="html"><![CDATA[<p>@anoopmb<br />If any value with &amp; is selected in the dropdown, after clicking on it the selected value turns into &amp;<br />so i have changed the typer.value = selectedoption.innerHTML; to typer.value = selectedoption.innerText;<br />in the following:</p><p>selectedoption.innerHTML = selectedoption.innerHTML.replace(/ /gi, &#039; &#039;);<br />&nbsp; &nbsp; typer.setAttribute(&quot;value&quot;, selectedoption.innerHTML);<br />&nbsp; &nbsp; // typer.value = selectedoption.innerHTML;<br />&nbsp; &nbsp; typer.value = selectedoption.innerText;<br />&nbsp; &nbsp; var hidden = document.createElement(&#039;INPUT&#039;);</p><br /><p>I also added the following regex in the typer.onblur<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; + selval = selval.replace(/&amp;/gi, &#039;&amp;&#039;);</p><p>here is the updated code:<br />&nbsp; &nbsp; typer.onblur = function (event) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if (optgropc != 1) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pop(&quot;none&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; optgropc = 0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (typer.value == null || typer.value == &#039;&#039; || typer.value != selectedoption.innerHTML) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var selval = selectedoption.innerHTML;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; + selval = selval.replace(/&amp;/gi, &#039;&amp;&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selval = selval.replace(/\&lt;u\&gt;/ig, &#039;&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selval = selval.replace(/\&lt;\/u\&gt;/ig, &#039;&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selval = selval.replace(/ /gi, &#039; &#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; typer.value = selval;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hidden.value = selectedvalue;</p>]]></content>
			<author>
				<name><![CDATA[dz]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=44997</uri>
			</author>
			<updated>2022-04-21T15:17:45Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=40907#p40907</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: FA WITH AUTOCOMPLETE  DOWNLOAD]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33793#p33793" />
			<content type="html"><![CDATA[<p>thanks Braath and i will upadate the code shortly with your changes</p>]]></content>
			<author>
				<name><![CDATA[anoopmb]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18207</uri>
			</author>
			<updated>2018-12-30T15:05:59Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33793#p33793</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: FA WITH AUTOCOMPLETE  DOWNLOAD]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33787#p33787" />
			<content type="html"><![CDATA[<p><a href="https://gist.github.com/braathwaate/94fdbf7dfad04c1f4a1768d745c837db">Code fixes for special characters and lost focus</a></p>]]></content>
			<author>
				<name><![CDATA[Braath Waate]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41493</uri>
			</author>
			<updated>2018-12-29T16:28:31Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33787#p33787</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: FA WITH AUTOCOMPLETE  DOWNLOAD]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33786#p33786" />
			<content type="html"><![CDATA[<p>@Braath Waate</p><p>yeah, please do your contribution so everyone can get benefit of it<br />thanks for notifying these issues</p>]]></content>
			<author>
				<name><![CDATA[anoopmb]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18207</uri>
			</author>
			<updated>2018-12-29T14:17:17Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33786#p33786</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: FA WITH AUTOCOMPLETE  DOWNLOAD]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33781#p33781" />
			<content type="html"><![CDATA[<p>The lists need special character handling so that names like &quot;A &amp; L&quot; Foods appear properly.&nbsp; One possible fix is to call</p><div class="codebox"><pre><code>function decodeHtml(html) {
    var txt = document.createElement(&quot;textarea&quot;);
    txt.innerHTML = html;
    return txt.value;
}</code></pre></div><p>where the code currently uses &quot;selval&quot; and</p><p>selectedoption.innerHTML= selectedoption.innerHTML.replace(/&amp;nbsp;/gi,&#039; &#039;);</p><p>which currently may not be doing anything because the browser just converts back.</p><p>Another minor problem is lost focus because FA does not expect to focus on a hidden variable, which in the new code has the old list name (the new list being named &quot;name&quot; + mselect).&nbsp; I have a simple fix for this if you are interested.</p><p>Thanks for the contribution.&nbsp; I already had autocomplete lists running on my site but I like yours better because it modular and non-invasive, so I replaced my code with yours.</p>]]></content>
			<author>
				<name><![CDATA[Braath Waate]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41493</uri>
			</author>
			<updated>2018-12-29T01:48:26Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33781#p33781</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: FA WITH AUTOCOMPLETE  DOWNLOAD]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33775#p33775" />
			<content type="html"><![CDATA[<p>I&#039;m also eagerly waiting for this <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />Thanks u so much in advance Anoop, you are doing awesome work <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" /> <br /></p><div class="quotebox"><cite>anoopmb wrote:</cite><blockquote><p>@ kvvaradha</p><p>yeah we can try that&nbsp; as the popup search type is available now&nbsp; in combo input function.</p><p>let me take a look</p><p>thanks for testing</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[phpninja123]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=44226</uri>
			</author>
			<updated>2018-12-28T14:53:25Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33775#p33775</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: FA WITH AUTOCOMPLETE  DOWNLOAD]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33772#p33772" />
			<content type="html"><![CDATA[<p>@ kvvaradha</p><p>yeah we can try that&nbsp; as the popup search type is available now&nbsp; in combo input function.</p><p>let me take a look</p><p>thanks for testing</p>]]></content>
			<author>
				<name><![CDATA[anoopmb]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18207</uri>
			</author>
			<updated>2018-12-28T08:23:21Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33772#p33772</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: FA WITH AUTOCOMPLETE  DOWNLOAD]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33767#p33767" />
			<content type="html"><![CDATA[<p>@anoopmb - I have tested your auto complete.&nbsp; Its working well. You have done a&nbsp; great job. There is one suggestion from my side. <br />When It comes with large list of options in select. Like more than 1000 items in the list. It will freeze the system for a while and will go on. </p><p>So if possible rewrite it to perform Ajax call and get results from server. By default you can show 20, items in the list. Rest should not be added to the list. When user start typing the related items should show here.</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2018-12-27T10:40:35Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33767#p33767</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: FA WITH AUTOCOMPLETE  DOWNLOAD]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33766#p33766" />
			<content type="html"><![CDATA[<p>@boxygen - you can use a software named &quot;, Meld&quot; ,it&#039;s available for Linux, windows and OS x. Can see the file differences if you compare the files with default core. You can get difference from it . Hope it helps you</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2018-12-27T10:35:10Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33766#p33766</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: FA WITH AUTOCOMPLETE  DOWNLOAD]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33763#p33763" />
			<content type="html"><![CDATA[<p>@boxygen</p><p> please use a file compare utility.</p><br /><p>i changed ui_lists.inc and auto_select_box.inc </p><p>changed $auto_select_box to $SysPrefs-&gt;auto_select_box</p>]]></content>
			<author>
				<name><![CDATA[anoopmb]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18207</uri>
			</author>
			<updated>2018-12-27T07:26:21Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33763#p33763</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: FA WITH AUTOCOMPLETE  DOWNLOAD]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33762#p33762" />
			<content type="html"><![CDATA[<p>@anoopmb can you mention the changes you made in the core. Overwriting my files with your files will overwrite some of my modifications too.</p><p>Thanks in Advance</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2018-12-27T05:41:24Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33762#p33762</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: FA WITH AUTOCOMPLETE  DOWNLOAD]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33760#p33760" />
			<content type="html"><![CDATA[<p>@pswamis</p><p>Hi,</p><p>you can download the changed files from here </p><p><a href="https://membtech.in/demo/downloads/fa-autocomplete-2.4.6.zip">Download files</a></p><p>its updated to latest version 2.4.6</p><p>thanks for using this</p>]]></content>
			<author>
				<name><![CDATA[anoopmb]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18207</uri>
			</author>
			<updated>2018-12-27T03:49:44Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33760#p33760</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: FA WITH AUTOCOMPLETE  DOWNLOAD]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33759#p33759" />
			<content type="html"><![CDATA[<p>To make this work with v2.4.6:<br />add in the auto_select_box lines in ui_lists.inc and auto_select_box.inc but change them to @$SysPrefs-&gt;auto_select_box and define the global SysPrefs.&nbsp; Then add in the MBCODE block in js/inserts.js and the escapeRegExp (late adder) outside the MBCODE block and the call to mbselect in the &#039;select&#039; block.&nbsp; Add the MBCODE block in the desired theme.</p>]]></content>
			<author>
				<name><![CDATA[Braath Waate]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41493</uri>
			</author>
			<updated>2018-12-27T00:57:35Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33759#p33759</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: FA WITH AUTOCOMPLETE  DOWNLOAD]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33754#p33754" />
			<content type="html"><![CDATA[<p>Hi Anoop,<br />I&#039;m using Front Account v2.4.6 and I&#039;m completely new to this..<br />I was trying to apply your solution for autocomplete dropdown, but its not working, can you please help me here, it&#039;s a very urgent requirement for me..<br />Thanks in advance.</p>]]></content>
			<author>
				<name><![CDATA[pswamis]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=44206</uri>
			</author>
			<updated>2018-12-26T16:05:59Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33754#p33754</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: FA WITH AUTOCOMPLETE  DOWNLOAD]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=27768#p27768" />
			<content type="html"><![CDATA[<p>In Post 16 bogeyman has given the link to download</p><p>http://stuff.w3shaman.com/others/fa-autocomplete.zip</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2017-05-05T15:19:16Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=27768#p27768</id>
		</entry>
</feed>
