Website Primer
Section 4. Java Applets and JavaScripts
JavaScript is a scripting language which has been developed by Netscape. Sorry all Microsoft IE people, but it's true.
Javascript is NOT java (the applet). Java Applets are small programs which mostly run gimmicks inside your popular browser. Javascript is a language with seemingly infinite possibilities, depending on how involved your mathematics/logic skills are.
Popular browsers (we must exclude Webtv for now, sorry it is javascript handicapped) must have Javascript enabled in your options/preferences menu. Many neophytes are stumped why their pages won't act properly and get error messages. Scripts can work hand in hand with HTML, kinda like a good marriage. You need the basics of HTML tho' before attempting to write or copy and embed these little scripts, mind you, some are not little at all.
Without going into writing Javascript we'll look at some basic copy-overs which are needed for most pages nowadays.
<form> <input type="button" value="Don't be shy...click the button"
onClick="alert('You may copy this popup alert code over and
plunk it down anywhere on your page. Change the words
for the button value and your message.')"> </form>
<form> <input type="button" value="This works" onClick="openWin()"> </form>
You may copy the code over and plunk it down anywhere. Change the words for the values. There are two input tags here.
<form name="myForm"> <input type="text" name="input" value="Put a message here"> <input type="button" value="Write to the text window" onClick="document.myForm.input.value= 'Good for you!'; ">
<SCRIPT LANGUAGE="JavaScript"> <!--/* Copyright (C) Don't know, suspect Netscape
development. This script can be re-used or modified,
if credit is given in the source code.
I will not be held responsible for any unwanted effects
due to the usage of this script or any derivative.
No warranties for usability for any specific application
are given or implied.
Modified by Eddie 2Dogs--January 17,1996...you may remove
this lengthy notice from the script when you copy it over
because it is just an example of what to expect.*/
function stopError() { return true; } window.onerror = stopError; // --> </SCRIPT>
<script language="javascript1.1"> <!-- image01= new Image(120,78) image01.src="images/scream.gif" image02= new Image(120,78) image02.src="images/scream1.gif" //--> </script>PART 2 the target="_top" statement is a convention to check that the page you are linking to will not be stuck in someone's or your own frames...If you run frames leave it out...
<a href="helpindx.html" target="_top" onmouseover="filter2('example2','image02')" onmouseout="filter2('example2','image01')" onclick="return true"> <img src="images/scream.gif" name="example2" border="0"></a>
Hint...image 1, the one you see is the still gif..image 2 is the animated gif which comes to the fore when the mouse is rolled over the image...for this effect to work well on all systems your images should be kept as small as possible, preferrable around 100 - 120 pixels wide and high...
To automatically show when your were updated copy the following script to any and all of your pages at your site...If you don't want the font, change it to your liking, change or delete the copyright notice...You will see a working example just down below my index table.
<font size=2 color="#000000">Your copyright notice here ie: © 1999 Me and me alone,Just an aside here...some servers seem to have regressed their dates (quick Y2K fixes???), it may show up on your own system before upload at the correct date and time, but once uploaded it may be a totally different date...example: this page...probably shows correct if you are at my http://eddie2dogs.org site but if you are reading this at Fortune City it will probably show December 31, 69...go figure...it was a far out year man, what I can remember of it. Oh wow...everything is waving back and forth and look at all those colors.....................*chuckle*
<script language="javascript"> <!-- var update update=document.lastModified document.write(" Updated: "+update) //--> </script></font>
On Mouseover effects, when your mouse glides over a link to display a message in the status bar of the browser (the bottom bar which usually shows the url of the link)...run your mouse over the Next Section link below and see the effect...
<A HREF="mynextpage.html" onmouseover="window.status='My Next Page I Want You To Go To';return true;"
onmouseout="window.status='This is the Basic Javascript Primer © 1999 Eddie2Dogs'">
Next Section</A>
Just copy and change the url and the text statements to whatever you want to say...be nice...you may also use this to drive home a copyright notice on the onmouseout section...
The Rules Backgrounds Music
Java Compatibility
Main Site Index Ratings System Icons |
---|
Copyright © 1999 Ed Ladeur,