1 (edited by anoopmb 12/28/2018 08:04:26 pm)

Topic: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

Hi,

As per the request from members of this forum i have made ajax driven autocomplete feature

**WARNING**

its on development only
use at your own risk

this update is on latest version (2.4.6)

demo can be found here

username : demouser
password : demo

Changed Files Zip can be downloaded from  here

Expecting your comments an suggestions or your on mods to this

ANOOP
Experience is the name everyone gives to their mistakes!

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@anoopmb, I have tested this Ajax Version. I would suggest that there shall be a Variable controlling to Use Ajax or Not in Config. The Ajax is needed if the list goes long. Secondly along with Ajax at least first 100 values shall be shown in the list.

Ajax searching is taking time. So Initially when the list is not long the user can set $ajax_use=false something like that.

Its a great feature.

www.boxygen.pk

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@boxygen

sure we can , will do it on next update

ANOOP
Experience is the name everyone gives to their mistakes!

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@anoopmb: The changed files zip is a dead link.

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@apmuthu

HI link is updated

ANOOP
Experience is the name everyone gives to their mistakes!

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@anoopmb : Thank u so much for your help with ajax autocomplete, I have integrated this mod in my code, I'm having more than 80k items in stock master and idea of having ajax search was to reduce page load time which is more than 2 mins without ajax implementation but adding ajax search its taking 1.8 mins which is not much improvement for me, can you please suggest what else may went wrong in my situation ?
PS : I have already added Indexing and other stuff to improve query performance..

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@phpninja123

I have updated the files and download link. Please download new files and check,

update includes

1. removed looping
2. you can now enable/disable ajax search in config.php

ANOOP
Experience is the name everyone gives to their mistakes!

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

You are the savior @anoopmb, thank u so muchh smile

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@anoopmb

One more suggestion. The Ajax may be mostly needed for customer, supplier and item lists.

Since the auto complete is incompatible with pop up search so can we use the Check boxes of Item, Supplier and Customers options in company setup to enable, disable ajax for these lists while disabling for all other small lists  instead of using one variable to control ajax for all lists

www.boxygen.pk

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@phpninja123 what is the time  for search now?

www.boxygen.pk

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@phpninja123

welcome and thanks for using this feature

hows the loading speed now?

ANOOP
Experience is the name everyone gives to their mistakes!

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

HI @boxygen

let me check, we can do that

ANOOP
Experience is the name everyone gives to their mistakes!

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@joe: This would be a nice integration if well done as no jquery or other heavy libraries are used.

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@anoopmb, the download link is broken now.

www.boxygen.pk

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@boxygen

migrating to new server reconstructing my website will be back soon

ANOOP
Experience is the name everyone gives to their mistakes!

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@anoopmb. If possible kindly share any DropBox link of the Code. I was about to implement. Thanks

www.boxygen.pk

17 (edited by anoopmb 01/19/2019 01:52:42 am)

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@boxygen

dropbox link

Download files

ANOOP
Experience is the name everyone gives to their mistakes!

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@anoopmb I have tested your code. it creates "popups" each key i type.

Like it creates like this " popups popups popups popups popups popups popups popups popups popups popups popups popups popups popups" .

<div class=" popups popups popups popups popups popups popups popups popups popups popups popups popups popups popups" style="position: fixed; left: 267.5px; top: 174px; width: 169px; display: none;"><div class="lister"><ul class="mselect-rset"><li title="" class=" anoselect" id="1">Donald Easter</li><li title="" class=" anoselect" id="2">MoneyMaker&nbsp;-&nbsp;EUR</li><li title="" class=" aselected" id="3">Varadha</li></ul></div></div>

Kindly fix it. also the Ajax concept i didnt understand. it brings all the elements in the customers when i see.

Subscription service based on FA
HRM CRM POS batch Themes

19 (edited by anoopmb 01/17/2019 08:15:14 pm)

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@kvvaradha

thanks for notifying this. Fixed and updated dropbox download link

kvvaradha wrote:

Ajax concept i didnt understand. it brings all the elements in the customers when i see

I didnt get it

ANOOP
Experience is the name everyone gives to their mistakes!

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

anoopmb wrote:

I didnt get it

I mean, the ajax driven autocomplete means, when a FA has more than 1,00,000 customers. and when a user has to pick a right customer is from the drop down is complicated. So your auto complete helps to get it from the list.  But the problem is , the select list loads all the 1,00,000 customers in the list. So the FA freezes in its page load and its operations. So, when the customers list renders, it should show the most recent 10 customers in the list.  When the salesman starts typing the customer name, it should bring the filtered results from the server to narrow down the search and by the way it will not freeze or hang the invoice page.

The samething i already explained in your another topic which talks about autocomplete.

So i thought this one handles such a thing.

Subscription service based on FA
HRM CRM POS batch Themes

21 (edited by anoopmb 01/18/2019 06:09:49 am)

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@kvvaradha

This issue has resolved earlier (see post no 7 ) . Please use latest files

ANOOP
Experience is the name everyone gives to their mistakes!

22 (edited by boxygen 01/18/2019 02:06:05 pm)

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@anoopmb, thanks for the download link.

I can't find the Ajax enable/disable option in the config.php file as you said in Post#7. Can you please recheck

I doubt you have uploaded the non ajax version in the drop box  because the zip file doesn't contain the word ajax. Sorry for disturbing you. Please double check.

I applied it to FA246. I am sure this is non Ajax Version.

www.boxygen.pk

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@boxygen

sorry mistakenly uploaded non-ajax version

here is the download link again

Download

Post's attachments

fa-autocomplete_ajax-2.4.6.zip 248.9 kb, 16 downloads since 2019-01-19 

You don't have the permssions to download the attachments of this post.
ANOOP
Experience is the name everyone gives to their mistakes!

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

@anoopmb thanks, this is OK

www.boxygen.pk

Re: AJAX DRIVEN AUTOCOMPLETE DEMO & SOURCE

anoopmb wrote:

@boxygen

sorry mistakenly uploaded non-ajax version

here is the download link again

Download

@anoopmb - This is what i asked, This is awesome.  i have tested your program, it works fine.

I found one thing was missing from the core. Let me tel you here.

From sales invoice page,or items page. you can see a textbox before the drop down. When we type the item code like say for example if i type 101 with default US coa. it will get us first item automatically in the drop down. This you have override it. i mean its not working either in your auto complete and ajax auto complete versions.

While taking one step forward, we dont need that feature, if we can type the stock id to get the product in the list.

I mean, if you enable it to check the stock id for items, debtor no for customers, supplier id for suppliers to get the list working.  If you add it like this, i guess it would be perfect replace for the existing textbox item code search, and popup search box. quite simple textbox will filter the product from the list, whether its 1,00,000 or more than that, we dont need to worry,  FA will handle the items.

Once again, its a great job @Anoopmb. Congrats for the bold step to change the core concept.

Subscription service based on FA
HRM CRM POS batch Themes