user input javascript training

How to get user input in JavaScript

There are times in JavaScript when you’ll need to get the user’s input so you can perform some sort of calculation with it.  One of the most used methods to get user input is the command document.getElementById(“someId”).value.  To use this you would first need a …

Read More

create javascript object

How to create a JavaScript Object

In JavaScript, there is a thing called an object.  It’s something that can contain a value that is equal to something else.  Those are called key/value pairs.  There’s a key that is equal to some value.  It’s a way that you can have a variable …

Read More

substring vs substr javascript training

Substr vs Substring in JavaScript

JavaScript has some slick ways of dealing with strings (words, sentences, etc.)  There are a couple of methods in JavaScript called substr() and substring() that do similar but very different things.  Both are able to extract certain parts of a word or sentence to be …

Read More

jquery toggle effect

JQuery Toggle Drop Down Effect

jQuery is a pretty amazing JavaScript library.  It allows you to do things with JavaScript that were, back in the day, pretty tough to pull off.  Today I want to show you how to do a simple toggle drop down effect using jQuery.  The first thing …

Read More

JavaScript Regular Expressions

How to use JavaScript Regular Expressions

Video of regular expressions with phone numbers: This tutorial is going to look at a JavaScript regular expression example using zip codes and break down all the pieces.  The problem I’ve found with regular expressions is they aren’t something you can just look at and …

Read More

apply css to xml

How to apply CSS to XML

Sometimes there will be times when you’ll need to take a body of XML information and apply CSS styles to it.  Luckily, it’s not too hard to do.  Let’s say you have an XML document that looks like this (the content about the movie is …

Read More