Home » JavaScript (page 20)

JavaScript

jQuery Disable Button Example

The aim of this example is to show you how to enable/disable a button using the famous jQuery library of Javascript. This is a pretty simple task but very useful on certain cases like when you want to submit a form and disable the button that did so, or just because a button is part of a conditional statement and ...

Read More »

Javascript Redirect URL example

It has happened to all of us to click a certain URL and be redirected to another one. Probably you even wondered why did that happen. Well, possibly the page moved to a new, more suitable domain or the programmer has built versions of the same page that depend of the type of browser you use so you are redirected ...

Read More »

JavaScript Survival Tools for the Java Developer

Although I’ve worked with JavaScript a bit here and there over the years, I have not used it as regularly or consistently as I’ve used Java. I have also not used it for anything nearly as complex as for what I’ve used Java. Therefore, it is not very surprising that moving from commonly used Java to seldom used JavaScript offers ...

Read More »

Using the jQuery UI datepicker with ASP.NET MVC

I wanted to start the real code for my side project by making a small skeleton of the project in ASP.NET MVC. This skeleton includes a basic form to create an event, which will be the starting point of the application. An event has a name with a start date and an end date that are represented as DateTime, so ...

Read More »

Javascript On Page Load Example

The onload event is a function or code that is executed after the page or window is fully loaded. But why do we use it? Generally, it is used to deal with cookies, or to display a certain version of the page according to the user’s browser type and/or version. Here’s how! Syntax The onload event, having a relatively easy ...

Read More »

Understanding Backbone.js from the lens of a Java programmer

Let me start this blog in favor of backend or server-side programmers by making the following statement: “A server-side programmer (Java or similar) can understand nuances of javascript client or server-side frameworks or libraries much more quickly than an html developer”.  There are two key reasons behind the above statement: Client-side development is not limited to HTML/CSS rather it has evolved ...

Read More »

Magic $parse service in AngularJS

AngularJS has a useful, but less documented $parse service which is shortly described in the Angular’s docu as “converts Angular expression into a function”. In this post, I will explain what this description means and show explicit and implicit usages of $parse. Furthermore, we will see the differences to the Angular’s $interpolate service and $eval method. Implicitly used $parse The $parse compiles an expression to ...

Read More »

jQuery Form Validation Example

Writing forms is a very common task while developing web applications. But if you need a form you should validate it. Very often it comes to server-side validation, but not necessarily every time. And here jQuery provides a very useful API for rapid creation of client-side form validation. Let’s take a closer look. 1. HTML We’ll assume that we need ...

Read More »

jQuery Tabs example

In a recent post, we showed the Dialog component example from jQuery ui library and how it’s simple to integrate and use it in a web application. In this example, we will see another component from the same perfect library, it’s jQuery ui Tabs. Tabs! What is it? Yes, like the browser tabs, we can integrate this feature in a ...

Read More »

Javascript Check Undefined Example

By now we all know that in Javascript we attach types to values and not variables, like in most other programming languages. One of these types is undefined. All variable declarations are initialized firstly with undefined, until we give them another value. When we don’t declare the variables, they just do not exist, but when we declare them and forget ...

Read More »

Want to take your WEB dev skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • PHP Programming Cookbook
  • jQuery Programming Cookbook
  • Bootstrap Programming Cookbook
  • Building WEB Apps with Node.js
  • CSS Programming Cookbook
  • HTML5 Programming Cookbook
  • AngularJS Programming Cookbook