Javascript Tutorials

Don't confuse Java with JavaScript. They are not the same. Javascript is a simple programming language that can easily be embedded in your web page's header to make your page more dynamic and "sticky." Java is a tough programming language if you don't have programming experience.

Programming in JavaScript is object-oriented. Think of your web page as an object. How do you access your web page? What do you use to access it? Say you want to type your name in the login box of your blog. That login box is your object. You type in your name and press enter and something happens . What happens is that action is calling upon a block of directions in your program to make it happen as correct or incorrect. Either the next action is called on, such as inputting a password, or a box comes up telling you to re-input your username because it was incorrect. All that probably happened in a simple JavaScript program likely embedded into your HTML header and body.

It probably looks something like this:


When you preview the script in your text editor, you should see a box with an elongated oval above it that reads Username and to the right of the box another elongated oval that reads Submit. 

That is a very simple example of JavaScript programming and there are quite a few versions being developed for open source programmers. But what does it all mean in the context of the above example script?

First, note that the javascript description and function is placed within the header of the html. Next note that the actual input instructions are placed within the body of the html. This is called embedding as the function is embedded in the header and the instructions are embedded into the body. You can liken a function to a methodology.

Next, note that whatever you type into the box is called a variable because you can type anything into the box. In this case, you type in your username, a simple type of data. Or think of the box and what you type in it as a virtual data room in its simplest terms.

Operators are used to assign a value to your variable based on what you want to accomplish. You want to type in your username, but to know that you need to do this, you see an elongated oval over the box that says Username. Then it clicks: hey, I need to type my username into the box. The terminology VALUE="Username" is the syntax and the = sign is the operator. 

What can you use JavaScript for? You can insert games into your web page, weather boxes, alerts, pretty much any type of dynamic content that you want people to come back to and utilize. That simply means that when people come back to play a game of solitaire, for instance, that you've placed on your page by way of JavaScript, that your web site has become sticky. Sticky meaning that you just can't get away from wanting to return to the site.

There is a lot of free JavaScript already written and available for you to embed into your web page. Most programmers and developers ask that you keep their acknowledgments embedded within the script and send them your link so that they can keep track of who uses it and how it is being used.