Cannot read property ‘toLowerCase’ of undefined

I am finally back with another post after a while. I had this time period where I got busy with other things in life and felt a little tired for coding and blogging. That seems to be over now. Thank you my little angel. 🙂 Today I was working on my Django project and had […]

What is TypeScript, ECMAScript and JavaScript?

After a long break, I am back with another productive and informative post. Have you heard about the language TypeScript? What is the relation between JavaScript, ECMAScript and TypeScript? Here is a brief answer to this question. What is TypeScript? TypeScript is an open source programming language developed and maintained by Microsoft. It is a superset […]

Lambda Expressions and Javascript

Have you ever heard of the term “lambda”? Does it sound like a complicated thing to you? Don’t be scared! After reading this short post, it won’t be that scary. Lambda Expressions in Various Programming Languages So, how do they describe Lambda Expressions in different programming languages? 1-Lambda Expressions are nameless functions given as constant […]

Functions as Variables in Javascript

A JavaScript function is a block of code designed to perform a particular task. A JavaScript function is executed when “something” invokes it (calls it). A JavaScript function is defined with the function keyword, followed by a name, followed by parentheses (). (w3schools) In this mini post, I will briefly mention the concept of functions as […]

Javascript Inheritance – Prototype and Prototype Chain

I am a big fan of javascript and I love scripting. In this post I will be talking about one of the most important concepts in javascript. Inheritance, protoyping and prototype chain.   If you are familiar with oop (object-oriented programming) languages like C#, Java etc. then you know what inheritance is. Javascript inheritance is […]

Invalid object passed in, u0027:u0027 or u0027}u0027 expected

Assume you have created a beautiful dynamic web app, with some cool webservices to get the results from and dynamically process + place them on the client-side. In this dynamic app of yours you must be careful while sending (POSTing) text parameters to your services with your XMLHttpRequests because if you don't, you might encounter […]

How to – Display Multiple Spaces Using innerHTML

Have you ever tried to display multiple spaces in a page element using innerHTML property with javascript? If so then you probably encountered this problem of collapsing multiple spaces. Apparently this is how HTML works. It collapses multiple spaces into one space until you specifically tell him otherwise. For example let's say you have a […]

How to Detect Browser Using Javascript

When it is about client-side programming you have to make everything cross-browser compatible and sometimes this requires detecting the browser your visitor is using and then run the related piece of code. Actually it is quite easy. What you need is the value of userAgent property of the navigator object. For all the major browsers […]

JavaScript – Using ‘replace’ Method with a Callback Function

Many of the JavaScript samples on using 'replace' method will be basic samples showing you how to replace a predefined string with another predefined string. What if you want to find strings that match a specified criteria and replace them with an HTML string structured USING the matched string? For this you will need to go one […]