Oldmanjoe's Potpourri of JavaScript Pages
JavaScript 000
Introduction to example pages using JavaScript. Includes a simple use of the Navigator Object (no reference to Netscape), plus a couple of its properties.
JavaScript 001
This script is actually slightly ahead of its proper placement in these pages. It shows how an array can be defined in a function as well as how HTML code can be embedded into strings within JavaScript. Also shows how both the SELECT and OPTION tags are used. A text box is put on the screen with no functionality whatsoever.
JavaScript 002
Uses simple functions defined in HEAD and called in BODY to to do such trivial tasks as changing background colors. Also includes a simple text box and button that does nothing more than echo text in an alert box.
JavaScript 003
Shows a very primitive password checker using if-else statement in JavaScript. (More here than meets the eye!)
JavaScript 004
Nothing really new here except that a random number generator is shown that randomly chooses from among 16 colors. Used to randomly change background colors using OnMouseOver event handler (not currently working in Netscape navigator). VERY HOKEY PAGE!! Apologies from Oldmanjoe.
JavaScript 005
Demonstrates the ability to put a scrolling message in the status bar.
JavaScript 006
Shows how a frame set (split screen) is defined.
JavaScript 007
Top half of screen (upper frame). No need to go here since you would normally go to this page through JavaScript 006. Has a simple recursive function for computing factorial numbers.
JavaScript 008
Bottom half of screen (lower frame). No need to go here since you would normally go to this page through JavaScript 006. A repeat of hokey random background color example from JavaScript 004.
JavaScript 009
Slightly more sophisticated manner of password checking, but still not a secure method of protecting information.
JavaScript 010
Very simple encoding example to show some text handling features of JavaScript.
JavaScript 011
Special request from Johnny: Upper frame presents a text box into which you put a URL. The page referenced by the URL is presented in the bottom frame.
JavaScript 012
Slightly more sophisticated function for encoding/decoding. At least the encoding/decoding is symmetric. That is, encoded string is decoded into a string that when encoded gives you back the original string.
JavaScript 013
Color tester. This one is neat! One of you asked for it--I don't recall who. Anyway, it's nothing more than JavaScript that allows you to key in a color or a Hexadecimal code (preceded
or not preceded
by a "#") to see what it looks like. Make up brand new colors of your own!(Just input 6-character strings consisting of any of the digits 0-9 or the alphabetical characters A-F.
JavaScript 014
This example should have preceded JavaScript 001. It clearly shows the relationship between the SELECT and OPTION tags. It also shows in a very simple manner the actions of the onChange and onBlur event handlers. And oh yes, it tells you just a little bit more about Oldmanjoe's children and cats.
JavaScript 015
This example provides a method for creating a pop-up window (that is admittedly Microsoft in nature) that opens and closes upon clicking the appropriate button.
JavaScript 016
Time for some fun! This example was given to me as part of a final project by one of my CSM 470 students. To follow the code, you have to be able to follow relatively simple C source code. I have no idea from where this script was stolen, but guaranteed, the student didn't write this code!
JavaScript 017
Are you interested in knowing how much time before the millennium bug kicks off and makes COBOL programmers all over the world (including me) rich?
JavaScript 018
More simple scrolling, but a chance for you to begin to understand the properties used with the methods associated with some of the built-in string objects. Do you know how to speed the scrolling up? Make the message longer or shorter? Etc.?
JavaScript 019
Here's some interesting code I picked up from a student (who probably stole it) that shows a number of things. It demonstrates how timers can be relatively easily built, but also shows exactly how the TR and TD tags work when making tables. Some knowledge of the C Programming Language helps here.
JavaScript 020
Don't click on this little example unless you are ready for some anxiety!!! Be careful where you place your mouse pointer -- from the first moment on!!! And oh yes: two points to whoever can get safely back to the Oldmanjoe Home Page without turning off your computer and
ten
points (plus one ten year-old cat with no teeth) for anyone who can get safely back to this Table of Contents. -- So far, I only know how to get back to my home page, and even that takes a swift mouse movement while the lights are out. (You'll see what I mean soon enough!) If anyone knows a "quick fix" for this to work more smoothly, let me know in my Guest Book, okay?
JavaScript 021
This is an example of how one must deal with multi-dimensioned arrays. Basically, you have to set up "arrays of arrays" where the arrays are single-dimensioned--all that is allowed thus far in JavaScript. This also shows an excellent example of the use of recursive functions. To see what can be produced, key in "Ryan" (or maybe "John Joseph I") in the text box of first dialog box that appears. It is HIGHLY recommended that you view the source HTML on this one--and study it.
JavaScript 000
"Which brings us back to . . . doe, a deer, a female deer . . ."
To return to my homepage, Click here.