Sorted by:  

How to Use the XMLHttpRequest Object in JavaScript

It may at first seem that JavaScript’s XMLHttpRequest object is intensely complicated, but it really isn’t if you take it apart and view it a bit at a time. In reality, most developers use only a few well-known [more…]

How to Create Custom Events in JavaScript to Program with HTML

The standard events provided with JavaScript perform well for most common tasks. But, sometimes, you will need a custom event. For example, you must have a method of performing a click, and JavaScript [more…]

How to Change HTML Elements in JavaScript

The focus of CSS is on the HTML element. CSS answers the question of how a <p> tag appears to the viewer. There are two methods of working with HTML elements statically: as part of the individual tag and [more…]

How to Build Dynamic HTML Elements in JavaScript

One of the building blocks for creating special effects for any page is the ability to make dynamic HTML changes to the page. For example, you may want to create a special effect for the selected element [more…]

How to Create JavaScript-Based Menus to Program with HTML

The concept of a JavaScript-based menu is straightforward. When you hover a mouse pointer over a menu, it opens any submenu and lets you choose one of the options on the submenu, if desired. Moving the [more…]

How to Access HTML Form Elements in JavaScript

As with any other HTML elements, you can interact directly with HTML5 elements in JavaScript. The trick is to ensure that the elements you choose will work with the browsers and platforms you need to support [more…]

How to Validate HTML Form Elements in JavaScript

Validation is an important part of working with HTML forms. Unfortunately, not every browser provides support for the validation features of HTML5. The example you find here won’t work with Internet Explorer [more…]

How to Find a Location with JavaScript

Knowing your location is an important part of working with JavaScript applications in a browser environment. The location object makes it possible to determine the current location that the user is viewing [more…]

How to Use the Navigator Object in JavaScript

The navigator object provides support for a number of interesting properties and methods in JavaScript. All of these properties and methods tell you something about the browser used to access the page. [more…]

How to Create Pop-Ups in JavaScript

JavaScript provides access to three kinds of dialog boxes: alert(), confirm(), and prompt(). You can do multiple things with pop-ups. For example, you can make information appear on multiple lines in these [more…]

How to Use Cookies in JavaScript

Cookies store application information on the user’s drive. When a user visits a site, the JavaScript application can use a cookie to store information for future use. Some cookies are quite simple and [more…]

How to Display XML with JavaScript on an HTML5 Page

XML is a great way to store data with JavaScript. However, it isn’t the easiest way to see the data. All of the tags tend to hide the data rather than make it easy to understand. A generated XML file tends [more…]

How to Validate XML with JavaScript on an HTML5 Page

One of the strengths of XML is that it presents data in a highly structured manner making the context of the data understandable for JavaScript. However, one of the weaknesses of XML is that it doesn’t [more…]

How to Load XML with JavaScript on an HTML5 Page

Many we developers explore XML as a storage technology. You can also interact with XML files using a combination of JavaScript and HTML5. The example shows how you could parse an XML document by using [more…]

Why You Should Use AJAX with JavaScript on an HTML5 Page

Many JavaScript users and web developers have heard of AJAX, assumed it was a special sort of language, and never went any further. AJAX isn’t a new language; it’s a reuse of existing technology to create [more…]

How to Perform AJAX Tasks with JavaScript

Using AJAX with pure JavaScript is a two-part process. First, you must send the request. Second, you must process the response. The following code shows the two parts of the process used to change just [more…]

How to Load jQuery from Google CDN to Use with JavaScript

Many web developers use multiple libraries, like Google Content Distribution Network (CDN), when creating a JavaScript application because each library has something special to offer. Each reference to [more…]

Server-Side Programs with JavaScript

It’s entirely possible that your real world production JavaScript application won’t require any sort of server-side processing — that all your application will ever need is to grab resources in the form [more…]

How to Use HTML5 and JavaScript to Canvas Your Web Page

HTML5 includes the concept of a canvas. As with the artist’s version of the physical canvas, you use the HTML5 canvas to draw images onscreen. Using the canvas makes it easier to manage various sorts of [more…]

How to Retrieve Results from AJAX Calls with JavaScript

It’s time to build a few JavaScript applications to see what jQuery can do for you when you’re retrieving results from AJAX calls. Although your real-world situations will be more complex, the process [more…]

How to Manage Text Input and Output with JavaScript for HTML5 and CSS3 Programming

Perhaps the most intriguing application of the DOM in JavaScript is the ability to let the user communicate with the program through the HTML5 web page, without all those annoying dialog boxes. Here is [more…]

How to Nest Your JavaScript If Statements for HTML5 and CSS3 Programming

There are a few variations of the ifstructure you'll sometimes run across in JavaScript when programming your HTML5 pages. One variation is the nestedif [more…]

How to Use JavaScript to Make Decisions with Switch for HTML5 and CSS3 Programming

JavaScript, like a number of languages, supports another decision-making structure called switch. This is a useful alternative in HTML5 and CSS3 programming when you have a number of discrete values you [more…]

How to Use JavaScript to Create a For Loop for HTML5 and CSS3 Programming

The standard for loop in JavaScript counts the values between 1 and 10. The “count to ten” button triggers the count()function for your HTML5 and CSS3 programming. Here's the code for [more…]

How to Use JavaScript to Make a While Loop for HTML5 and CSS3 Programming

Here, you can see a dialog box asking for a password. When programming your HTML5 web page, you can use JavaScript to achieve this same box with a while [more…]


Sign Up for RSS Feeds

Computers & Software
Win $500. Enter Now.