Implemented an AJAX solution

I have tested with 50000 rows (from DB) and it works like a charm