Home » JavaScript (page 10)

JavaScript

Javascript Frame Example

The aim of this tutorial is to describe and demonstrate using JavaScript to manipulate and interact with iframes, showing how to access and modify properties of the iframe element, how to communicate with the document inside the iframe, getting information from the iframe and passing information to it. Iframes, or inline frames, allow you to load separate HTML files into ...

Read More »

Basic JavaScript arrays reminder

I’m pretty bad when it comes to remembering syntax details for languages I don’t use every day, especially since I work with a few languages that use C-syntax and not just JavaScript. Also, it’s not the kind of details I want to spend a lot of time studying since this information can easily be found. In most cases, it’s easy ...

Read More »

Creating a hash in Node.js

Introduction We require hashes everywhere, like setting the password in database as hash instead of plain text password, to check whether if file is tampered or not during transmission or checking integrity of file or messages transferred over network, etc. This small article will give detailed look at creating hash from Node.js core crypto module and later in the article, it shows how ...

Read More »

Lazy inter-module communication with require() and webpack

Motivation CommonJS’ modules can be loaded on demand with require.ensure(…). Example: require.ensure(["module-a"], function(require) { var a = require("module-a"); // module-a can be used now ... }); The well-known module bundler Webpack supports this syntax for loading modules on demand. Such lazy loaded module(s) define a split point. Split points split the codebase into “chunks” (separate JavaScript files) which are loaded on demand. This ...

Read More »

First steps with Angular 2: 8 cool features

I’ve been doing some work the last couple of weeks with Angular2. I really like it. Not just because it uses typescript, but also because it feels really natural and straightforward while working with it. No more string based dependency injection, or strange digest cycle stuff, it just seems to work. This last week I’ve migrated our beta-13 Angular app ...

Read More »

Javascript Timer Example

The aim of this example is to explain the timing events in javascript. The javascript window.setTimeout(function, milliseconds) function is used to execute a function, after waiting a specified number of milliseconds. This method returns a timeout id. Notice, setTimeout and window.setTimeout are essentially the same, the only difference being that in the second statement we are referencing the setTimeout method ...

Read More »

ES6 and beyond – What i really like

Hi dear software companions. It has been a long time. A lot had happened in between. I even changed a residence :) But enough about me. Let’s talk some JavaScript. Recently i have read a book called You Don’t Know JS: ES6 & Beyond written by Kyle Simpson. I was fully overwhelmed with the amount of new features and syntax shortcuts (or ...

Read More »

Angular.js Single Page Application Example

Angular.js is one of the frameworks in the programming world that is acutely becoming one of the most widely-used of them, as it’s incomparable in providing us with the means to create dynamic and efficient web-apps. There are a number of useful features that have made Angular not only famous for, but also irreplaceable in web-developing. One of these features ...

Read More »

Angular.js $location Example

One of the scenarios that you may have encountered while using AngularJS in your project is having to use the current URL of the website. It becomes especially important when you have to do routing or when the current URL is crucial to the well-functioning of your web-app. There’s an AngularJS service we use whenever we have to deal with ...

Read More »