Helping people with computers... one answer at a time.

I can't access my HotMail account and it says on my log on page that i need javascript to go any further. Just what is javascript and why do i need it?

Well, the short answer is that Javascript is a programming language, and you need it because HotMail says you do.

I know, that's not very helpful. Let's see if I can explain in a little more detail.

Anything that happens on your computer happens because some kind of program tells your computer to do it. In fact, quite often it's some kind of program telling some other kind of program to do it. It can get quite complicated, as you can imagine.

Take web pages, for example. Each web page is, essentially, a kind of computer program that tells your browser what to do. And, naturally, there are several different type of programming languages that can be used.

In (over) simplified terms:

HTML, or HyperText Markup Language, is the basic language of the web. It describes how a page should look. The browser follows the HTML instructions as it reads and presents the page. Once the page is complete, the browser's done, and the HTML "program" is over.

DHTML, for Dynamic HTML, adds more programming constructs to HTML to create a way for the DHTML "program" to "do" things dynamically. For example with DHTML the web page can specify actions to be taken when certain events happen. A good example is what happens if you move the mouse over this sentence and see its color change from black to red.

Javascript is not specifically HTML related, but interacts with HTML and DHTML when used in a browser. It's a more traditional programming language, in that you can write a series of instructions to compute what kinds of actions should be taken based on various conditions, repeat things a variable number of times, and just generally take more complex and sophisticated actions. Small applications and games have been written entirely in Javascript.

The line between DHTML and Javascript can sometimes get blurry, but a rule of thumb I use is simple: DHTML is about the web page, period. The items on a web page, the events that a web page might want to act on (like moving your mouse over text), and the resulting changes to the web page that you might want to have happen resulting from those events (like changing the color of text). Javascript, however, is really web, and HTML, independent. It adds programming things like loops, and variables and functions. You could write a small program to calculate Pi in Javascript, and then perhaps use DHTML to do something interesting on the web page with it.

ActiveX is the next level up. It, too, represents a programming language, but in a different form. An ActiveX control is more like a ".EXE" or ".DLL" file on your computer. Much like that .EXE, it can be written in any programming language, but is "compiled" or transformed into your computer's "machine" language before it gets distributed for use. ActiveX controls have the most power and speed, and represent the most danger. That's why you'll almost always want your browser to ask you before downloading and installing any ActiveX controls.

So in a nutshell, HTML, DHTML and Javascript are all programming languages that are used to make your web pages look and act the way we do.

Now, while HTML and DHTML are fundamental parts of your browser, Javascript, for various reasons can be turned off. But that doesn't stop some sites from requiring it. HotMail being one big example. They've written portions of the HotMail interface using Javascript in order to provide their functionality. So in order to use HotMail, you must have Javascript enabled.

So the bottom line is that you need Javascript ... because the websites you're visiting have chosen to use it.

Article C2393 * July 23, 2005 « »

Share this article with your friends:

Share this article on Facebook Tweet this article Email a link to this article
Leo Leo A. Notenboom has been playing with computers since he was required to take a programming class in 1976. An 18 year career as a programmer at Microsoft soon followed. After "retiring" in 2001, Leo started Ask Leo! in 2003 as a place for answers to common computer and technical questions. More about Leo.

Not what you needed?

Recent Comments
10 Comments
Jim
March 24, 2009 11:20 AM

Very informative. I dropped Java from a small laptop simply to save memory space. However, it will be interesting to note when I receive any notice of its need.

robert
June 13, 2009 6:45 AM

Do I need to keep all the previous updates for Java on my computer ? Do the updates over ride previous updates so that I can delete the previous updates which take a lot of MB space on my computer ?

Patricia
September 22, 2009 9:26 AM

Would Javascript alter my own web pages.
The colour of the text has changed from black to red,blue and black.
Also I can no longer alter my web pages.
Can you Help me with this problem, I don't know who else to ask.

Regards Patricia

Bernard Winchester
June 1, 2010 5:17 PM

Thank you for an informative article.

I too have been confused about Java and Javascript. My limited understanding is that they are not directly related, although Sun Microsystems are in charge of both. Also, as I understand it, Javascript is incorporated in all reasonably modern browsers and can generally be turned on or off in the Security settings.

I certainly would like to know more about Java, such as to what extent it is included in browsers, and how necessary is the full download as opposed to, say, the smaller Microsoft Java Virtual Machine, which is still obtainable if no longer supported by MS.

Glenn
April 8, 2013 2:22 PM

Thanks for defogging tricky Java. And a BIG thanks for continuing with Ask Leo. You're the gold standard.