5 Useful Javascript Libraries


1. Datatable.js
Use this library to add advanced interaction like pagination, search controls to any HTML table. The pagination and search are completely on the client side and hence there is no delay in filtering or paging. This interaction can be applied on a prebuilt table or you can either fetch and display data in a table asynchronously. You have complete control over the DOM of the Table too.

More information at https://www.datatables.net/

For Ajax Operations: https://www.datatables.net/examples/ajax/objects.html

Example Use case: Showing a table of Accounts with client side pagination and search. This search works on any column in the table.

2. Select2.js
Use this library to create searchable drop downs with Autosuggest. Similar to Datatable.js, you can enable this on preloaded options in select boxes, or you can use Ajax to fetch the dropdown values.

More information at https://select2.github.io/examples.html

Example Use case: An Autosuggest and searchable drop down for City, ZipCode etc during registration process

3. Typeahead.js
Very similar to Select2, but this operates on a Textbox instead of a Dropdown.

More information at https://twitter.github.io/typeahead.js/

Example Use case: Product ID Text Box - Entering text in it would auto suggest existing productIds

4. SignaturePad.js
With more and more applications now mobile enabled, this library makes it easy to capture signatures from a mobile device. It gives a blank box where users can draw their signature.

More information at https://github.com/thomasjbradley/signature-pad/blob/gh-pages/documentation.md

Example Use case: Capture the users signature and store it in a rich text area on the record.

5. html2Canvas.js
This allows you to capture a screenshot of a page from the page itself. The output is an image which can be stored.

More information at https://html2canvas.hertzen.com/

Example: For Error Logging - The end user can attach a screen shot of the page when reporting an error.

posted on 20 February 2016

DataTable Select2 TypeAhead SignaturePad Javascript Visualforce