Make your own free website on Tripod.com
JAMES' JAVA STUFF   

The codes below are for you to use in your web pages.  These are the ones that I thought you would like the most.  The color chart is at a different site because it needed to be made with notepad and this page isn't made by notepad so I can show you the codes.

  Here is a list of them for easier navigation.

Mad button | Cross Browser Marquee | Hotmail | Password Gate
Drop Down Menu | No Right Click | Color Chart

  MAD button.
This is a very fun script that I have on this site's home page.  Here is what it looks like.

JavaFILE

Please Push The Button, but be warned, push it only once, or face the consequences!!!!



Here is the code.

<script>
<!-- language="Javascript"


var alerted_already;
var remark;


function theytyped(form) {
       for (   j = 1;
               j<=remark.length && remark[j]!=form.myoutxt.value;
               j++){}
       if (j>remark.length)
               form.myoutxt.value = "Do not type here!";
       return false;
}


function touched_frog() {
       if (!alerted_already) {
               alert(""+
                     ""+
                     ""+
                     ""+
                     ""+
                     "");
               alerted_already = true;
       }
       return alerted_already;
  }

function compute(form) {
       for (var i = 1;
            i<=remark.length && remark[i]!=form.myoutxt.value ;
            i++){}
       if (i==remark.length)
               history.back();
       if (i==remark.length-1)
               alert("Dear Sir or Madam:"+
"\n\n   It has come to our attention that you have been harassing"+
"\none of the buttons on the web.  Although most buttons are"+
"\nunderstanding about this type of thing (being repeatedly pressed),"+
"\nsome rogue buttons have decided to form a support group and have"+
"\npetitioned me, the webmaster for funds to provide a secure place for"+
"\nrest and relaxation.  Due to the large number of requests, this"+
"\nwarning has been installed:"+
"\n  IF YOU PERSIST PRESSING THIS BUTTON,"+
"\nYOU WILL BE EJECTED FROM THIS SCREEN."+
"\n\n   Thank you for your cooperation,"+
"\n\n      The Federation for Oppressed and Abused Buttons"+
"\n\nenclosure: Message from oppressed complaintant"+
"\n\n\n\nDear Federation for Oppressed and Abused Buttons"+
"\n\n   As I have been able to secure your assistance before,"+
"\nI beg your help in stopping the on going abuse I am once again"+
"\nforced to endure.  THIS FREAKIN' NUT CASE  WILL NOT STOP!"+
"\n\n   Sincerely"+
"\n\n      Push Me"+
"\n\np.s.  I will definitely attend the annual meeting next July");


       if (i<remark.length)
               form.myoutxt.value = remark[i+1];
       else
               form.myoutxt.value = remark[1];
  }

function initArray() {
     this.length = initArray.arguments.length;
     for (var i = 0; i < this.length; i++)
       this[i+1] = initArray.arguments[i];
  }

remark = new initArray( "Thanks!",
                       "Once is enough!",
                       "Are you deaf?",
                       "Go Away!!..Quite bothering me!!",
                       "SOMEBODY STOP THIS CRAZY PERSON!",
                       "I give up. Please stop.",
                       "I SAID PLEASE, WHAT'S WRONG WITH YOU!",
                       "I understand your need to push buttons, but please stop!",
                       "This is NOT funny!",
                       "I give up.",
                       "This is now a back button!");

alerted_already = false;

// end hiding contents -->
</script>

<title>JavaFILE</title>
<base target="leftframe">
</head>

<body BGCOLOR="#ffffff" link="#CC0033" vlink="#333399" alink="#FF0000" <!--content start-->

<table WIDTH="96%" BORDER="0" CELLSPACING="5" CELLPADDING="5">
 <tr>
   <font
   FACE="ARIEL,HELVETICA" SIZE="-1"><form name="buttons" method="post"
   onSubmit="return false">
     <div align="center"><center><p><input type="button" name="pushme" value="Push Me"
     onClick="compute(this.form)"
     onMouseOver="window.status='LEAVE ME ALONE!';
return touched_frog()"> <input type="text"
     value=" " name="myoutxt" onBlur="theytyped(this.form)" onFocus="theytyped(this.form)"
     onChange="theytyped(this.form)" size="40"> </p>
     </center></div>
   </form>
   <p align="center">Please Push The Button, but be warned, push it only once, or face the
   consequences!!!! </font></td>
 </tr>
</table>
<!--content stop-->

_____________________________________________________________

Up to the List

  Cross Browser Marquee
I use this a lot.  Here is a sample.

Here is the code: (Replace from you can put what you want it to say here until Enjoy! with what you want the marquee to say).

<script language="JavaScript1.2">

/*
Cross browser marquee script
*/


//Specify the marquee's width (in pixels)
var marqueewidth=330
//Specify the marquee's height (in pixels, pertains only to NS)
var marqueeheight=20
//Specify the marquee's scroll speed (larger is faster)
var speed=4
//Specify the marquee contents
var marqueecontents='<font face="Arial"><strong><big>You put you what you want it to say here.  You can make links like this. <A HREF="http://www.javafile.com">This like goes to JavaFile.</A> Or an e-mail link, <A HREF="mailto:jgw_2000_87@hotmail.com">E-mail me</A> Enjoy!</big></strong></font>'

if (document.all)
document.write('<marquee scrollAmount='+speed+' style="width:'+marqueewidth+'">'+marqueecontents+'</marquee>')

function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
setTimeout("window.onresize=regenerate",450)
intializemarquee()
}
}

function intializemarquee(){
document.cmarquee01.document.cmarquee02.document.write('<nobr>'+marqueecontents+'</nobr>')
document.cmarquee01.document.cmarquee02.document.close()
thelength=document.cmarquee01.document.cmarquee02.document.width
scrollit()
}

function scrollit(){
if (document.cmarquee01.document.cmarquee02.left>=thelength*(-1)){
document.cmarquee01.document.cmarquee02.left-=speed
setTimeout("scrollit()",100)
}
else{
document.cmarquee01.document.cmarquee02.left=marqueewidth
scrollit()
}
}

window.onload=regenerate2
</script>


<ilayer width=&{marqueewidth}; height=&{marqueeheight}; name="cmarquee01">
<layer name="cmarquee02"></layer>
</ilayer>

_____________________________________________________________
Up to list

  Hotmail

Let people (if your site is on the internet) check their e-mail from your site.  This is what it looks like (not sure if works).
JavaFILE

HotMail


Login:    Password:

 
Frames   No Frames   Use my Default

HotMail Login ID Storage Program 1.1
Written and 1998 Michael Nobilio
mnobilio@hotmail.com

DIRECTIONS: Click "Store Login" to save your Login ID.



Here is the code, leave this one alone:

<script LANGUAGE="JavaScript">

<!--

// HotMail Login ID Storage Program
// Written and © by Michael Nobilio
// June 7, 1998
// mnobilio@hotmail.com
//
// Distribute Freely, as long as
// this notice is left in the code.
//
// Please notify me of any bugs.



notice = "Click \"Store Login\" to save your Login ID.";
promptMessage = "No Login Stored";

function setCookie(name, value, expire)
{
       document.cookie = name + "=" + escape(value) + ( (expire == null) ? "" : ("; expires=" + expire.toGMTString()) );
}

function getCookie(Name)
{
       var search = Name + "=";
       if( document.cookie.length > 0 )
       {
               offset = document.cookie.indexOf(search);
               if( offset != -1 )
               {
                       offset = offset + search.length;
                       end = document.cookie.indexOf(";", offset);
                       if( end == -1 )
                       {
                               end = document.cookie.length;
                       }
                       return unescape( document.cookie.substring(offset, end) );
               }
       }
}

function storeLogin()
{
       if( loginID != null )
       {
               promptMessage = loginID;
       }

       var Value = prompt("Enter a Login ID to store:", promptMessage);
       if( Value == null )
       {
               Value = promptMessage;
       }
       var today = new Date();
       var expires = new Date();
       expires.setTime( today.getTime() + (365*24*60*60*1000) );
       setCookie( "HotMailLogin", Value, expires );
}

// -->

</script>

<title>JavaFILE</title>
<base target="leftframe">
<!-------------------------------------------->
<!--  HotMail Login ID Storage Program 1.1  -->
<!--  Written and © by Michael Nobilio      -->
<!--  June 7, 1998                          -->
<!--  mnobilio@hotmail.com                  -->
<!-------------------------------------------->
<!--  Distribute Freely, as long as         -->
<!--  this notice is left in the code.      -->
<!-------------------------------------------->
<!--  Please notify me of any bugs.         -->
<!--                                        -->
<!--  1.1 Bug fixes:                        -->
<!--   * Existing Login ID is now populated -->
<!--     when "Update Login" is clicked.    -->
<!--   * Prompt "Cancel" bug fixed.         -->
<!--                                        -->
<!-------------------------------------------->

<body BGCOLOR="#FFFFFF" TEXT="#000000">

<form NAME="passwordform" ACTION="http://207.82.250.251/cgi-bin/start" METHOD="post">
 <input type="hidden" name="curmbox" value="ACTIVE"><input type="hidden" name="js"
 value="no"><div align="center"><center><table CELLSPACING="0" CELLPADDING="0">
   <tr>
     <td WIDTH="20"><br>
     </td>
     <td><div align="center"><center><p><font FACE="arial" SIZE="+2"><b>HotMail</b></font> </td>
   </tr>
   <tr align="center">
     <td WIDTH="15"><br>
     </td>
     <td><table BORDER="1" CELLSPACING="1" CELLPADDING="10">
       <tr>
         <td><table CELLSPACING="0" CELLPADDING="0">
           <tr>
             <td><font FACE="arial" SIZE="-2"><b>Login: </b></font></td>
             <td>&nbsp;&nbsp;</td>
             <td><font FACE="arial" SIZE="-2"><b>Password: </b></font></td>
             <td></td>
           </tr>
           <tr>
             <td><input TYPE="text" NAME="login" SIZE="16" MAXLENGTH="16" onFocus="this.select();"> </td>
             <td><br>
             </td>
             <td><input TYPE="password" NAME="passwd" SIZE="16" MAXLENGTH="16"> </td>
             <td ALIGN="center" VALIGN="bottom">&nbsp;<input TYPE="submit" NAME="enter" VALUE="Enter"> </td>
           </tr>
           <tr>
             <td NOWRAP ALIGN="center" COLSPAN="3"><input TYPE="radio" NAME="frames" VALUE="yes"><font
             FACE="arial" SIZE="-3"><i>Frames</i></font> &nbsp; <input TYPE="radio" NAME="frames"
             VALUE="no"><font FACE="arial" SIZE="-3"><i>No Frames</i></font> &nbsp; <input TYPE="radio"
             NAME="frames" VALUE="auto" checked><font FACE="arial" SIZE="-3"><i>Use my Default</i></font>
             </td>
             <td><br>
             </td>
           </tr>
         </table>
         </td>
       </tr>
     </table>
     </td>
   </tr>
 </table>
 </center></div>
</form>
<div align="center"><center>

<table WIDTH="450">
 <tr>
   <td ALIGN="center"><form NAME="storeForm">
     <font SIZE="-1"><p><input NAME="saveLogin" TYPE="button" VALUE="Store Login"
     onClick="storeLogin(); history.go(0);"></font></p>
   </form>
   </td>
 </tr>
 <tr>
   <td VALIGN="top" ALIGN="center"><table CELLSPACING="0" CELLPADDING="10">
     <tr>
       <td ALIGN="center"><font FACE="arial" SIZE="-2">HotMail Login ID Storage Program 1.1<br>
       Written and © 1998 Michael Nobilio<br>
       <a HREF="mailto:mnobilio@hotmail.com">mnobilio@hotmail.com</a></font></td>
     </tr>
   </table>
   </td>
 </tr>
</table>
</center></div><font SIZE="-1" FACE="arial"><b><i>

<p align="center">DIRECTIONS: Click &quot;Store Login&quot; to save your Login ID.</i></b></p>

<p align="center"><br>
</p>
</font>
_____________________________________________________________
Up to List

  Password Gate

This can be just to annoy people or used to only let special people in.  I have only used this once.
JavaFILE
Password protect as many pages as you like with this script! You can assign each user his/her password and username. Note: When you install this on your site, you do not want to include a value= attribute for your input fields.  An alert will pop up if you type in an incorrect password or name.

Members-Only Area!

Username:
Password:
Use username as your username and password as your password.


Here is the code:

<html>

<head><script LANGUAGE="JavaScript">

<!-- This script and many more are available online from -->
<!-- The JavaScript Source!! http://javascriptsource.com -->

<!-- Begin
function Login(){
var done=0;
var username=document.login.username.value;
username=username.toLowerCase();
var password=document.login.password.value;
password=password.toLowerCase();
if (username=="you" && password=="password") { window.location="http://sim-dudes.tripod.com/pass.htm"; done=1; }
if (username=="member2" && password=="password2") { window.location="http://www.javafile.com/javascripts/browsers/pass3.htm"; done=1; }
if (username=="member3" && password=="password3") { window.location="http://www.javafile.com/javascripts/browsers/pass3.htm"; done=1; }
if (done==0) { alert("Invalid login!"); }
}
// End -->
</script>

<title>JavaFILE</title>
<base target="leftframe">
</head>

<body BGCOLOR="#ffffff" link="#CC0033" vlink="#333399" alink="#FF0000" <!--content start-->

<p align="center"><img src="http://www.javafile.com/images/banner.GIF"
alt="banner.GIF (2826 bytes)"></p>

<table WIDTH="96%" BORDER="0" CELLSPACING="5" CELLPADDING="5">
 <tr>
   <td WIDTH="100%"></font><font
   FACE="ARIEL,HELVETICA" SIZE="-1"><p align="center"></font>Author: <font
   FACE="ARIEL,HELVETICA" SIZE="-1"></p>
   <form name="login">
     <div align="center"><center><table width="225" border="1" cellpadding="3">
       <tr>
         <td colspan="2"><div align="center"><center><p></font><font color="#FF0000" size="3"><b>Members-Only
         Area!</b></font><font FACE="ARIEL,HELVETICA" SIZE="-1"></font></td>
       </tr>
       <tr align="center">
         <td><font color="#0000FF">Username:</font></td>
         <td><input type="text" name="username" value="member1" size="20"></td>
       </tr>
       <tr align="center">
         <td><font color="#0000FF">Password:</font></td>
         <td><input type="text" name="password" value="password1" size="20"></td>
       </tr>
       <tr align="center">
         <td colspan="2" align="center"><input type="button" value="Login!" onClick="Login()"></td>
       </tr>
     </table>
     </center></div>
   </form>
   </td>
 </tr>
</table>
<!--content stop-->
</body>
</html>
__________________________________________________________
Up to List

  Drop Down Menu

Even though you can get this from the Seitz home page, here it is again.  I thought it would be easier to get here.



Here is the code.  It's in two parts.  The first part put in your head tags and the second put in you body tags.

<html>

<head>

</head>
<BODY>
<?php include "../../head.php"; ?>
<p>
Choose a destination page from the drop down menu and click Go!<p>
<!-- INSTALLATION OF DROP DOWN SURFING -->
<!-- Step 1 add the script below to your HEAD tag -->
<p>&nbsp;
<script language="JavaScript">

// Benny Sparano benny3@chelsea.ios.com
// feel free to use this script as long as this text remains intact
// please link JavaScript World- Your Site for any and all JavaScript Info!
// http://chelsea.ios.com/~benny3/javascript/
// Copyright 1997 JavaScript World


<!-- Hide the script from old browsers --

function surfto(form) {

       var myindex=form.dest.selectedIndex

       window.open(form.dest.options[myindex].value,"main","");

}

//-->

</SCRIPT>

<!--Step 2 Add the following to your web page -->

<CENTER>

<FORM NAME="myform">

 <SELECT NAME="dest" SIZE=1>

   <OPTION SELECTED VALUE="">---------- A Simple Menu -----------

   <OPTION VALUE="http://www.javafile.com/">JavaFile Main
    <OPTION VALUE="http://www.bravenet.com">Bravenet Web Services
      <OPTION VALUE="http://www.mycomptuer.com">My Computer.com
    <OPTION VALUE="http://home.netcom.com/~tbrown6">Seitz Home page
    <OPTION VALUE="http://www.a1javascripts.com">A 1 Javascripts
  
</SELECT>
<P>
<INPUT TYPE="BUTTON" VALUE="Go there cause James said so" onClick="surfto(this.form)">

</FORM></CENTER>

</body>
</html>


__________________________________________________________
Up to List

  No Right Click

This script has probably been bothering you the entire time you have been here.  Here is the code.  Change WELCOME, THIS IS THE NO RIGHT CLICK SCRIPT. with what you want to annoy your visitors with.

<script language="JavaScript">

<!--
// No rightclick script v.2.5
// (c) 1998 barts1000
// barts1000@aol.com
// Don't delete this header!

var message="WELCOME, THIS IS THE NO RIGHT CLICK SCRIPT.";

// Don't edit below!

function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// -->

</script>