For the passed few weeks I have been explaining how to write your
"How can I password protect my site?" There are several methods
Time scripting language specifically designed for use in Web
Pages. That basically means that you don't have to compile, link
and embed it, processes which can be very complicated for none
Designers is that it can be quickly learned and easily used.
They are actually quite different. Java is an Object Oriented
programming language that is written, compiled and executed
independently of a Web Page. To use a Java applet (which
means a "little application"), it must be embedded
<EMBED> into the web page as an Object with the
necessary parameters or variables passed to it. The Java Applet
will then execute independently of the Browser as a separate
either the HEAD or BODY of a web page. Where you place it
depends on where it will be most appropriate. In fact, you can
executed by the Browser, its functions and variables are global; a
concept that will give many Object Oriented programmers the
can be used in another and can access the underlying HTML
DOM (Document Object Model) directly.
If that sounds complex, in fact it is not. It is probably more
intuitive for most novice users, which is exactly the intent. But if
you have little or no programming experience and really don't
want any, then you are in luck. There are many existing
your web pages. All you need is a little understanding of how to
correct format is:
Where "…java script code…" is obviously replaced with the
When the Browser sees the <SCRIPT> tag, it stops
interpreting HTML and starts interpreting scripting code. It
statement is not really necessary. There are other scripting
languages, such as VBScript, so it should be included. The
reaches the </SCRIPT> tag where it will start executing
The //<!-- and //--> are comment tags that are included for
are probably no longer needed but are still usually added.
and code must be placed inside the <SCRIPT> tags and
HTML tags must be placed outside. A common mistake by a
novice is to put HTML tags inside the SCRIPT.
A lot. As I said at the outset, this topic resulted from a question
do that is:
In this example, the actual password is "coffee". Change it to
whatever you would like. If the user enters an incorrect
response, they will be directed to the Web Page "incorrect.htm".
Again you should change this to an actual web page of your own
If you want to give it a try, simply copy and paste the code into
the HEAD of your HTML page.
If you like the contents of this newsletter, please recommend it to a friend. Not only will you help us to continue to provide you with useful and informative articles, you could also win $10,000. Click here for details.