<BODY onLoad="alert('Welcome to this page');">
<BODY onUnload="alert('Thank you for visiting this page');">
<a href="mailto:erich.siffert@dm.krinfo.ch" onMouseOver="window.status='You just moved the mouse over this link :-)'; return true">onMouseOver</a>
<A HREF="http://notes.krinfo.ch" onMouseOver="alert('This alert appears every time you move the mous pointer over this link')">Siffi's home</a>
<a href="mailto:erich.siffert@dm.krinfo.ch" onMouseOut="window.status='You just left this link :-('; return true">onMouseOut</a>
<a href="mailto:erich.siffert@dm.krinfo.ch" onClick="alert('Thank for sending a mail...')">onClick</a>
All this stuff is contained in the "navigator"-object....
The refering code looks like this:
<SCRIPT LANGUAGE="JavaScript"> <!-- hide from old browsers document.write("Your Navigator is (userAgent):" + navigator.userAgent); document.write("The application name:" + navigator.appName); document.write("The version:" + navigator.appVersion); document.write("The code name:" + navigator.appCodeName); if (navigator.javaEnabled) document.write("This browser is Java enabled..."); else document.write("This browser is not Java enabled..."); document.write("Plug-ins: navigator.plugins.length =" + navigator.plugins.length); document.write("<TABLE BORDER><TR><TH>#</TH><TH>Filename</TH><TH>Description</TH></TR>"); for (var i = 0; i < navigator.plugins.length; i++) { document.write("<TR><TD>" + i + "</TD>"); document.write("<TD>" + navigator.plugins[i].filename + "</TD>"); document.write("<TD>" + navigator.plugins[i].description + "</TD></TR>"); } document.write("</TABLE>"); document.write("MIME types: navigator.mimeTypes.length =" + navigator.mimeTypes.length); document.write("only 10 will be listed..."); document.write("<TABLE BORDER><TR><TH>MIME type</TH><TH>Description</TH><TH>Suffix</TH></TR>"); for (var i = 0; i < navigator.mimeTypes.length; i++) { document.write("<TR><TD>" + navigator.mimeTypes[i].type + "</TD>"); document.write("<TD>" + navigator.mimeTypes[i].description + "</TD>\n"); document.write("<TD>" + navigator.mimeTypes[i].suffixes + "</TD></TR>"); if (i > 10) break; } document.write("</TABLE>"); // end of hiding --> </SCRIPT>
<SCRIPT LANGUAGE="JavaScript"> <!-- hide from old browsers function ListLinks() { for (var i = 0; i < document.links.length; i++ ) { document.write("LinkArray[", i, "] : ", document.links[i]); } } ListLinks(); // --> </SCRIPT>
<SCRIPT LANGUAGE="JavaScript"> <!-- for (var i in document) { document.write("Property: ", i, " Value: ", document[i]); } // --> </SCRIPT>
<SCRIPT LANGUAGE="JavaScript"> <!-- //This is a little automated LAST MODIFIED script that you can stick at the //bottom of your pages and forget about updating it. //Hacked together by Stephen King and James Wright: 03/22/96 //It even works for the year 2000 and up!! function initArray() { // Thanks JavaScript Mailing List for this function this.length = initArray.arguments.length for (var i = 0; i < this.length; i++) this[i+1] = initArray.arguments[i] } var DOWArray = new initArray("Sunday","Monday","Tuesday","Wednesday", "Thursday","Friday","Saturday"); var MOYArray = new initArray("January","February","March","April", "May","June","July","August","September", "October","November","December"); var LastModDate = new Date(document.lastModified); document.write("This page was last updated on <strong>"); document.write(DOWArray[(LastModDate.getDay()+1)],", "); document.write(MOYArray[(LastModDate.getMonth()+1)]," "); document.write(LastModDate.getDate(),", ",(LastModDate.getYear()+1900), "</strong>"); // --> </SCRIPT>
<SCRIPT LANGUAGE="JavaScript"> <!-- hide from old browsers function PopIt(label, msg) { // Set up Page Colors & Table var s1 = "<TITLE>...</TITLE>" + "<BODY BGCOLOR='ffffff'><TABLE BORDER=0><TR>" + "<TD WIDTH=90% HEIGHT=90 VALIGN=TOP ALIGN=LEFT>"+ "<FONT SIZE=4>" var s2 = "<FONT COLOR='FF0000'><B>" + label + "</B></FONT><P>" var s3 = "</TD><TD WIDTH=10%> </TD></TR><TR><TD> </TD>" + "<TD VALIGN=TOP ALIGN=RIGHT>"+ "<FORM><INPUT TYPE='BUTTON' VALUE='close it...'" + "onClick='self.close()'>" + "</FORM></TD></TR></TABLE></BODY>" popup = window.open("","popDialog","height=500,width=700,scrollbars=yes") popup.document.write(s1+s2+msg+s3) popup.document.close() } // done hiding --> </SCRIPT>
<FORM><INPUT TYPE="BUTTON" VALUE="Example for a popup window" onClick="PopIt('Title for Window....', 'following text....<br>' + 'may contain links etc.:<a href="mailto:erich.siffert@dm.krinfo.ch">send me a mail</a>')"> </FORM><br>
<SCRIPT LANGUAGE="JavaScript"> <!-- var now = new Date(); var then = new Date("December 31, 1999"); var gap = then.getTime() - now.getTime(); gap = Math.floor(gap / (1000 * 60 * 60 * 24)); document.write("<font size=\"+2\">Still <Strong>" + gap + "</strong> days until " + then + "</font>"); // --> </SCRIPT>
<SCRIPT LANGUAGE="JavaScript"> <!-- begin // Array of day names var dayNames = new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"); // Array of month Names var monthNames = new Array( "Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"); var now = new Date(); document.write("Willkommen am " + dayNames[now.getDay()] + ", den " + now.getDate() + ". " + monthNames[now.getMonth()] + " 19" + now.getYear()+ "<br>Es ist jetzt " + now.getHours() + ":" + ( now.getMinutes() > 9 ? now.getMinutes() : "0" + now.getMinutes() )); // end --> </SCRIPT>
<big><font color="red" size="+1">You wasted the following ammount of time on this page:</font></big> <FORM name="stopclock"> <INPUT size=7 name=timespent value=" "> </FORM>
<script language="JavaScript"> <!-- begin startday = new Date(); clockStart = startday.getTime(); function initStopwatch() { var myTime = new Date(); return((myTime.getTime() - clockStart)/1000); } function check(){} function getSecs() { var tSecs = Math.round(initStopwatch()); var iSecs = tSecs % 60; var iMins = Math.round((tSecs-30)/60); var sSecs ="" + ((iSecs > 9) ? iSecs : "0" + iSecs); var sMins ="" + ((iMins > 9) ? iMins : "0" + iMins); document.stopclock.timespent.value = sMins+":"+sSecs; window.setTimeout('getSecs()',1000); } function slick(){} // end --> </script>
<BODY onLoad="window.setTimeout('getSecs()',1);check();slick();">
if (top.location != location) top.location.href = location.href;
<SPAN ID="banner" STYLE="position: absolute;"></SPAN>
<SCRIPT LANGUAGE="JavaScript"> <!-- if (NS4Rot || IE4Rot) setInterval('updateRot(' + arRot.length + ')', 3000); // --> </SCRIPT>
<script language="JavaScript"> <!-- hide it.... var bNameRot = navigator.appName; var bVerRot = parseInt(navigator.appVersion); var NS4Rot = (bNameRot == "Netscape" && bVerRot >= 4); var IE4Rot = (bNameRot == "Microsoft Internet Explorer" && bVerRot >= 4); if (NS4Rot || IE4Rot) { var iRot = 0; // global counter variable var arRot = new Array(); arRot[0] = '<STRONG>Hot site:</strong><a href="../index.htm">Siffis home</a>'; arRot[1] = '<STRONG>Another hot site:</STRONG><a href="../kat_f.htm">Kat F home</a>'; arRot[2] = '<STRONG>Yet another hot site:</STRONG>' + '<a href="../lotus.html">Lotus Notes links</a>'; arRot[3] = '<STRONG>More hot sites:</STRONG>' + '<A HREF="http://www.unitedmedia.com/comics/dilbert/">Dilbert zone</A>'; } function displayRot(idRot, strRot) { if (NS4Rot) { // if Navigator 4.0+ with (document[idRot].document) { open(); // open document write(strRot); // write to document close(); // close document } } else { // Internet Explorer 4.0+ document.all[idRot].innerHTML = strRot; // "assign" to element } } function updateRot(numRot) { displayRot("banner", arRot[iRot]); iRot++; // increment counter if (iRot == numRot) iRot = 0; // back to first text (link) } // done hiding --> </SCRIPT>
The code looks like this:
<SCRIPT LANGUAGE = "JavaScript"> <!-- // Array Function function makeArray() { var args = makeArray.arguments; for (var i = 0; i < args.length; i++) { this[i] = args[i]; } this.length = args.length; } // This array holds the descriptions and names of the pages. var pages = new makeArray(" - Please select a page - ", "Siffi's Home", "Leningrad Cowboys in Internjet", "Virtual Tourist", "Monty Python online", "C/C++ Library ", "Dr. Dobbs", "Whisky Tour", "Games Domain - Games Games Games", "Pizzakurier in Bern"); // This array hold the URLs of the pages. var urls = new makeArray("", "../index.htm", "http://www.leningradcowboys.fi", "http://city.net/regions/", "http://www.pythonline.com", "http://www.desy.de/user/projects/Lattice/Computing.html", "http://www.ddj.com", "http://scotch.com", "http://www.gamesdomain.co.uk/", "http://www.pizzakurier.ch"); // This function determines which page is selected and goes to it. function goPage(form) { i = form.menu.selectedIndex; if (i != 0) { window.location.href = urls[i]; } } //--> </SCRIPT> <BR> <SCRIPT LANGUAGE = "JavaScript"> <!-- // The select menu will be displayed wherever you place this code. document.write('<FORM><SELECT NAME = "menu" onChange = "goPage(this.form)">'); for (var i = 0; i < pages.length; i++) { document.write('<OPTION>' + pages[i]); } document.write('</SELECT></FORM>'); //--> </SCRIPT>
This part you have to insert before the <BODY> -tag, between <HEAD> and </HEAD>:
<SCRIPT LANGUAGE = "JavaScript"> // The Array Function function makeIdeaArray(len) { for (var i = 0; i < len; i++) this[i] = null; this.length = len; } // This is where the array of text/images/sounds is created. ideas = new makeIdeaArray(4); ideas[0] = "Type \"about:cache\" into your browser to find everything that is stored in your cache."; ideas[1] = "Type \"about:mozilla\" to get an odd message from the Netscape team." ideas[2] = "Hold down shift when pressing reload to clear a page\'s items from cache." ideas[3] = "Type \"view-source:\" preceding a document\'s URL to automatically view its source." // The random number generator. function rand(n) { seed = (0x015a4e35 * seed) % 0x7fffffff; return (seed >> 16) % n; } var now = new Date() var seed = now.getTime() % 0xffffffff </SCRIPT>
<SCRIPT LANGUAGE = "JavaScript"> // Where you place this is where the random object will be displayed. document.write(ideas[rand(ideas.length)]) </SCRIPT>
<SCRIPT LANGUAGE="JavaScript"> <!-- Hide al="`1234567890-=~!@#$%^&*()_+qwertyuiop[]QWERTYUIOP{}|asdfghjkl;ASDFGHJKL:zxcvbnm,./ZXCVBNM<>?"; // 0----5----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9 ab1=""; bctr=0; function ckPwd(){ tst=document.isn.username.value + "*" + document.isn.passwrd.value + "*"; ls=document.pd.pe.value; a=eval(ls.substring(0,2))-91; ls=ls.substring(2,ls.length); nls=""; flg=0; while (ls.length>12){ ab=eval(ls.substring(0,2))-89; ab1=(ab1==""?""+ab:ab1); oab1=ab1; ls=ls.substring(2,ls.length); for (var i=0;i<ab;i++){ nr=eval(ls.substring(0,2))-a; ls=ls.substring(2,ls.length); nls+=al.charAt(nr); } nls+="*"; if (nls.indexOf(tst)>-1){ ls=""; flg=1; } } if (flg==1){ tstOk(); } else{ bctr++; if (bctr>300){ location.href="index.htm"; } else{ alert("Sorry, wrong code!"); } } } function tstOk(){ ab1=ab1+""+a; alert("Congratulations, " +document.isn.username.value+"! You will be directed now to Siffis home!"); location.href="index.htm"; } //Fertig gehidet--> </SCRIPT>This part you have to insert wherever you want to have the password check:
<FORM NAME="pd"> <INPUT TYPE='hidden' NAME='pe' VALUE="98996859373641625837413695695837393683"> </FORM> <FORM NAME="isn"> <TABLE BORDER=2 CELLPADDING=3 CELLSPACING=0 BGCOLOR=BLUE> <TR><TD COLSPAN=2 ALIGN=CENTER><FONT SIZE=2 COLOR=WHITE FACE="helvetica,arial,geneva"> <B>CODE</B></FONT></TD></TR> <TR><TD><FONT SIZE=1 COLOR=WHITE><B>ID:</B></FONT></TD> <TD><INPUT TYPE="text" NAME="username" VALUE="Astrogator" SIZE=12></TD></TR> <TR><TD><FONT SIZE=1 COLOR=WHITE><B>Planet:</B></FONT></TD> <TD><INPUT TYPE="password" NAME="passwrd" VALUE="" SIZE=12></TD></TR> <TR><TD COLSPAN=2 ALIGN=CENTER> <INPUT TYPE="button" NAME="btn" VALUE=" Check " onClick="ckPwd();return false;"></TD></TR> </TABLE></FORM>
<SCRIPT LANGUAGE="JavaScript"> function scrollSiffi(seed) { var m1 = " + + + this is the scrolling message in window.status... + + + "; var m2 = " + + + this is the scrolling message in window.status... + + + "; var m3 = " + + + this is the scrolling message in window.status... + + + "; var msg=m1+m2+m3; var out = " "; var c = 1; if (seed > 100) { seed--; var cmd="scrollSiffi(" + seed + ")"; timerTwo=window.setTimeout(cmd,100); } else if (seed <= 100 && seed > 0) { for (c=0 ; c < seed ; c++) { out+=" "; } out+=msg; seed--; var cmd="scrollSiffi(" + seed + ")"; window.status=out; timerTwo=window.setTimeout(cmd,100); } else if (seed <= 0) { if (-seed < msg.length) { out+=msg.substring(-seed,msg.length); seed--; var cmd="scrollSiffi(" + seed + ")"; window.status=out; timerTwo=window.setTimeout(cmd,100); } else { window.status=" "; timerTwo=window.setTimeout("scrollSiffi(100)",500); } } } </SCRIPT>