Client-Side JavaScript
Credit: Mulchaey et al (ST Sci/UMD/NASA)
Here is a simple JavaScript program that will work:
<HTML>
<SCRIPT>
document.write(' Hello World ');
</SCRIPT>
</HTML>
All that is necessary is to place it in a file, say,
simple.html and include a referrence to it from some existing
page, e.g.,
<A HREF="simple.html">JavaScript</A>
and you are all set.
What JavaScript Can Do. JavaScript is a fully general
purpose language that could conceivably handle any type of problem.
However,
- Client-Side JavaScript is restricted so that it cannot
write anything to the server or client (except cookies)
and cannot read anything from the server except images, JavaScript
programs. It can read, write, and modify cookies on the client
machine.
- It is an interpretive language, so it is not suitable for
compute-intensive problems
- Its main realm of knowledge is the web-browser environment:
it has intimate knowledge of the web structure and can
manipulate and control much of its contents.
- Because it is restricted to the client side it is
very fast, easy to program, and very secure.
- It is very closely related to "JScript", operates in the same
environment and with similar operations, as "VBScript"
(although the syntax is totally different), and works
very well with both CGI and JavaScript
- However, JavaScript is NOT a simple form of Java and it is most
defintely NOT a simple language.
|
 |
 |
 |

Class Topics
Client-Side JavaScript
JavaScript as a Programming Language
Execution of JavaScript
"JavaScript" Document Object Model
Programming with JavaScript
Using Cookies in JavaScript
Using JavaScript to Write HTML
JavaScript and DHTML
JavaScript and CGI
Homework Assignments
|