Posts

Showing posts with the label JavaScript

Platform independent simple password manager application (Electron & NodeJS)

Electron is a framework for creating native applications with web technologies including JavaScript, HTML, and CSS. Electron enables create desktop applications with pure JavaScript by providing a runtime with rich native (operating system) APIs. It allows for the development of desktop GUI applications using Node.js runtime for the backend and Chromium for the frontend component. As a sample platform independent desktop application, I created the JPwdManager, a simple platform independent password manager application. An Electron application is essentially a Node.js application. The starting point is a package.json that is identical to that of a Node.js module. The script specified by the main field is the startup script of your app, which will run the main process. Our package.json file is as follows: {   "name": "jpwdmanager",   "version": "1.0.1",   "description": "platform independent simple password manager app...

Filtering html select listbox items

The efficient way of filtering select list box items may be achieved using JQuery $(function(){     $('#filterInput').keyup(function () {         doFilter(this);     }); }); /* filter method */ function doFilter(item) {     $(item).val($(item).val().toUpperCase());     var valFilter = $(item).val();     var valFilter2 = null;     if ($(item).val().length > 2)         valFilter2 = $(item).val();     $('#listItems>option').each(function () {         var text = $(this).text();         (text.indexOf(valFilter) == 0 || (valFilter2 != null && text.includes(valFilter2) == true)) ? $(this).show() : $(this).hide();     }); }