Who is this guy John?

Pricing Derivatives

Valuing equity

Develop MS Excel

Spreadsheets for MS Excel

Javascripts used on this site!

My Resume

Check out these links

Back to the main page

Email me


 
 
 
 
 
 
 
 
 

HTML and Javascripts used on this website!!!
I decided to let everyone that has enjoyed the pages that I have put together to view my code and add a some of the neat tricks on my own page to yours.
S o I guess I 'll start by telling you that all you need is Window's Notepad to make any of the scripts work.  Editors will not always copy the code correctly and there may be errors if scripts are not edited in notepad. Ok....here is a list of all of the neat things I have done and you can just copy the code!!! Use the quick links to browse the files.

 

Mouse Over Images

You may wonder how the heck can a button change when the mouse goes over it. Well, it is very simple: use the mouseover command. The menu to the left is a good example of this. So all you have to do are these things.

  1. Make two images. The first image will be the one that is always displayed on your screen and the second image is the one that you want to appear when your mouse goes over it. Be careful to ensure that their dimensions are alike when you create the image. I like to use Paint Shop Pro. Be sure to save the images into the same location as your web page that you are placing the script in. ie...C:\Mydocuments
  2. Copy this portion of the code into the top of your page, and copy this code into the areas that you would like images to appear. All you have to do is change the variables that are in italics to your specifications. If you want to add additional images, all you have to do is copy and add the portions of code that are in bold. The image definitions are imageon/off 1,2,3,4.....and the tags where it says <a href>.


Page Update


 

You can have your page automatically show when its last update was by adding this script. Simply copy this code into your web page.

Password Using Forms

Protect your pages with a password that is nearly impossible to crack. Sorry this script currently only works for IE users. Here is a demonstration (the password is "dude"):


 

To make this work do the following things:
 

  1. Create a page that visitors go to when the password is wrong, and call it "invalid.htm".
  2. Paste this code for the form you now see and place it where you want it to appear on your web page.
  3. Paste this code into a new notepad document.  Change the name for the correct page to whatever page you want visitors to see if the password is correct. Save this page as "script.js", and select All Files.
  4. NOTE: You can only change the words in italics.
Fade in and out

Click here for an example

If you would like to have the screen fade in and out when a page is loaded, like this page. Simply copy this code and place it near the top of your document, below the </head> tag.

Load Frames according to Browser

If your frames pages look different in Navigator and Explorer, get around it using this script. You only change the properties in Italics. Then on your frames page the only html that you need to define after the </head> is the pages themselves.
i.e. 

<FRAME NAME="_top" SRC="yourframename1.htm">

<FRAME NAME="Main" SRC="yourframename2.htm">
 

Determine if a frames page is actually being viewed in frames

Click here for an example

Sometimes a frames page is indexed by a search engine to itself, when it has to be viewed in frames. Well this script will automatically take a person to the main frames page, if the page is not currently in frames. All you have to do is modify the text that is in italics to change the location to the frames page that the person is being re-directed.

Load a new page once a page has been loaded

Click here for an example of this script with an alert as well

You may wonder why load a new page? Well, what if you had a page called "mypage.htm," and you renamed it "newpage.htm". Someone may have bookmarked the old page, and when they go to the old page it is not there. So in order to redirect the person simply place this code in the body of the page.

Alerts when viewing a page

Click here for an example

If you would like to tell a viewer something when viewing a particular page, use this script to bring up a message type box.

Drop down text box to load into a framed page

In order for this to work you have to place the drop down box in the frame that you want to have links, buttons, or whatever. Once an option is selected the page will load into the dependent frame (usually the biggest frame) and leave the parent or independent frame intact.

Here is what you have to do:

  1. Build a frames page that has two pages within it, and name the dependent frame "Main"
  2. Place this code into the parent or independent frame, and change the links to suit your page (links in italics).
  3. Place this code in the area that you would like your drop down box positioned. Change the names that you will see in the box by replacing the text in italics. Note that you can add to the list, and names so long as there are an equal number of links for each of the names. Also the first name is reserved for the title of the box.
Drop down box that goes to another web page

Simple change the links, and their names (I have placed them in italics) in order to use this script. Paste this portion underneath the </head> tag. Then, paste this portion of the script wherever you want the box to be viewed.

Navigation buttons

Here is an example of how you can use javascripts to load a page:

Copy this script to the place that you would like to place the button, and change the text in italics to suit your needs. Make sure that the page you want to link to is in the same directory as the page with this script.

If you are placing this on a frame page, replace location.href with parent.framename.location.

If you want to call a javascript that is on the current page enter this: OnClick="javascriptfunctionname()" into the script.

Or, you can display an alert on the push of a button. Here is an example:

This uses the alert script explained earlier, and the script for this button. Follow this link to get the code.

Watermark

You probably see a watermark in the lower right hand corner of the page right now. How the hell did I do it? To use this watermark follow these instructions:

  1. Make an image that you want as your watermark
  2. Paste this code right before the </body> tag.
  3. Change the text that are in italics for the image name, title, and size. You only have to change what I have italicized.
Calculator

Click here for an example

If you would like to have a calculator on your page, you can copy this scientific calculator that I have found, and modified for my own purposes. Simply paste this code into the head of the document. Then paste this portion into the body of your page.

Notepad

Click here for an example

If you want your visitors to have access to a notepad that saves information to their hard drive that is specific to your site, this is a cool script to use. Simply copy this code into its own web page and you are set. Then link to the page simply by using this html to open a new window:

<a href="javascript:void(0)" ONCLICK="open('notepad.htm','NOTEPAD TITLE','toolbar=0,
location=0,resizable=1,width=300,height=250')">

You can also use the above script to open a window for any link you desire.

 

Write text into a document based on brower type

Here is an example:

If you want your visitors to to see text or html features based on browser id, Simply copy this code into the area you want it to appear and change the text within the (' ') tags. You can add any html, or text you want...cool huh?

I hope that these scripts will come in handy for you, as they have for me :). If you are looking for that killer link, I totally recommend Builder.com as it has the coolest tools for designing your own scripts. Enjoy!


 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Copy this code into the top of your html page, just below the </head> document.

<script>
if (document.images) {

  image1on = new Image();
  image1on.src = "aboutb.gif";

  image2on = new Image();
  image2on.src = "excelb.gif";
 

  image1off = new Image();
  image1off.src = "about.gif";

  image2off = new Image();
  image2off.src = "excel.gif";

}

function turnOn(imageName) {
  if (document.images) {
    document[imageName].src = eval(imageName + "on.src");
  }
}

function turnOff(imageName) {
  if (document.images) {
    document[imageName].src = eval(imageName + "off.src");
  }
}

</script>

back to top
 
 
 
 
 
 
 
 
 

Copy this code into the particular area that you would like to see the image change.

<a href="aboutme1.htm" onmouseover="turnOn('image1'); window.status='About John';return true;"  onmouseout="turnOff('image1');window.status='';return true;"><img  src="about.gif" alt="Who is this guy John?" border="0"  width="89" height="18" name="image1"></a>

<a href="excel.htm" onmouseover="turnOn('image2'); window.status='Develop MS Excel';return  true;" onmouseout="turnOff('image2');window.status='';return true;"><img src="excel.gif"  alt="Develop MS Excel" border="0" width="160" height="18" name="image2"></a>

back to top
 
 
 
 
 
 
 
 
 
 
 
 
 

Copy this code and place it anywhere you want it to appear:

<SCRIPT LANGUAGE="JavaScript">
var LastUpdated = document.lastModified;
document.writeln ("This page was last updated " + LastUpdated);
</SCRIPT>

back to top
 
 
 
 
 
 
 
 
 

Copy this code anywhere you would like the field to appear:
<form name="forma">
<input name="passwordinput" type="text">
<input type="button" value="Verify Password" onClick="verify()">
</form>
<script LANGUAGE="Javascript" SRC="script1.js">

back to top
 
 
 
 
 
 
 
 
 
 

Copy this to a new notepad document and save it as script.js
 



<!-- function verify() { password1 = 'dude' correct = 'yourpage.htm' incorrect = 'invalid.htm' if (form.password.value == password1) { location.href=correct } else { location.href=incorrect } } // -->

 
 
 
 
 

back to top
 
 
 
 
 
 
 
 
 
 
 
 
 

Copy to top of document, under the </head> tag:

<SCRIPT LANGUAGE="JavaScript">
<!--

function makearray(n) {
    this.length = n;
    for(var i = 1; i <= n; i++)
        this[i] = 0;
    return this;
}

hexa = new makearray(16);
for(var i = 0; i < 10; i++) hexa[i] = i;
hexa[10]="a"; hexa[11]="b"; hexa[12]="c";
hexa[13]="d"; hexa[14]="e"; hexa[15]="f";

function hex(i) {
    if (i < 0)
        return "00";
    else if (i > 255)
        return "ff";
    else
        return "" + hexa[Math.floor(i/16)] + hexa[i%16];
}

function setbgColor(r, g, b) {
    var hr = hex(r); var hg = hex(g); var hb = hex(b);
    document.bgColor = "#"+hr+hg+hb;
}

function fade(sr, sg, sb, er, eg, eb, step) {
    for(var i = 0; i <= step; i++) {
        setbgColor(
        Math.floor(sr * ((step-i)/step)  + er * (i/step)),
        Math.floor(sg * ((step-i)/step) +  eg * (i/step)),
        Math.floor(sb * ((step-i)/step) +  eb * (i/step)));
         }
}

fade(0,0,0,255,255,255,150);

// -->
</SCRIPT>
 

back to top
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Copy this code into the <head> portion of your frames page, and only define the frames links in the body of the page.

<script>

 bVer = parseInt( navigator.appVersion );

 if( navigator.appName == "Netscape" && bVer >= 3 )
  document.write (' <FRAMESET ROWS="60,*" BORDER=0 FRAMEBORDER=NO FRAMESPACING=0>')

 else if( navigator.appName == "Microsoft Internet Explorer" && bVer >= 4)
  document.write (' <FRAMESET ROWS="55,*" BORDER=0 FRAMEBORDER=NO FRAMESPACING=0>')

 else
  document.write ('<FRAMESET ROWS="60,*" BORDER=0 FRAMEBORDER=NO FRAMESPACING=0>')

</script>
 

back to top
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Copy this code underneath the </head> tag.

<SCRIPT TYPE="text/javascript">
  <!-- 
  if (top == self)
          {
          location.href="correctpagenamehere.htm";
          }
  // -->
</SCRIPT>

 

back to top
 
 
 
 
 
 
 
 
 
 
 

Copy this code into any old page, or page that you want redirection from:

<meta http-equiv="refresh" content="5; URL=yourwebpagename.htm">
 
 

back to top
 
 
 
 
 
 
 
 
 
 
 

Copy this and paste it underneath the </head> tag:

<SCRIPT LANGUAGE="JavaScript">
alert('Here you type your text and you can place here whatever warning you want!!!!!!!');
</SCRIPT>
 

back to top
 
 
 
 
 
 
 
 
 
 
 
 
 

Copy this code into the parent or dependent frame on your web page:
 

<BASE TARGET="Main">
<script language="JavaScript">
<!--

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

var urls1 = new buildArray("",
"yourwebpage1.htm",
"yourwebpage2.htm",
"Yourwebpage3.htm",
"you can keep adding names.htm");

function go(which, num, win) {
  n = which.selectedIndex;
  if (n != 0) {
    var url = eval("urls" + num + "[n]")
    if (win) {
      openWindow(url);
    } else {
      parent.Main.location = url;
    }
  }
}

// -->
</script>
 

back to top
 
 
 
 
 
 
 
 
 
 
 
 
 

Copy this into the area you want the box to be viewed:
 

 <form name="form1">
 <select name="menu1" onChange="go(this, 1, false)">
<option>Name of drop down box to whatever you want
<option>Change this to the name you want to appear for the first link
<option>second link name
<option>third link name
 <option>fourth link name
<option>fifth link name
 </select>
</form>
 

back to top
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Copy this into the underneath the head tag, and replace or delete the address you want to be referred to.
 
 

<SCRIPT language="JavaScript">
<!--

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

var urls1 = new buildArray("",
"http://www.cob.ohio-state.edu/~fin/jobs/ib2.htm#Link4",
"http://www.cob.ohio-state.edu/~fin/jobs/ib2.htm#Link4",
"http://www.moneysearch.com",
"http://stocksense.com/valuation.html",
"http://www.wiso.gwdg.de/ifbg/finance.html",
"http://www.yardeni.com/sitemap.html",
"http://www.cob.ohio-state.edu/dept/fin/osudata.htm",
"http://margrabe.com/Links.html",
"http://www.fiu.edu/~daiglerr/deriv.htm",
"http://www.derivatives.com/comix/",
"http://www.chaoskitty.com/t_chaos/lounge.html",
"aboutme1.htm",
"Derivativepricing1.htm",
"johnres.htm",
"equity.htm",
"excel.htm",
"mailto:johnjaz@netcom.ca?subject=Page Visitor",
"index.html");

function go(which, num, win) {
  n = which.selectedIndex;
  if (n != 0) {
    var url = eval("urls" + num + "[n]")
    if (win) {
      openWindow(url);
    } else {
      location.href = url;
    }
  }
}

// -->
</SCRIPT>
 

back to top
 
 
 
 
 
 
 
 
 
 
 
 
 

Copy this to the area you would like to see the box appear.  Be sure to change the names of your links so that they match correctly.  The first name is reserved for the title that appears by default.

<FORM name="form1"><SELECT name="menu1" onChange="go(this, 1, false)">

<OPTION>Your title goes here&nbsp;
<OPTION>Careers in Investment Banking&nbsp;
<OPTION>Careers in Corporate Finance&nbsp;
<OPTION>Fundamental Information&nbsp;
<OPTION>Valuation Theories and Explanations&nbsp;
<OPTION>Various Finance Links&nbsp;
<OPTION>Economic indicators by Ed Yardini&nbsp;
<OPTION>OSU Finance Links&nbsp;
<OPTION>Various Derivative Links&nbsp;
<OPTION>Comprehensive Derivative Links&nbsp;
<OPTION>Comics about Derivatives&nbsp;
<OPTION>Loungin @ Vic's&nbsp;
<OPTION>About Me&nbsp;
<OPTION>Reseach Reports&nbsp;
<OPTION>Resume&nbsp;
<OPTION>Equity Valuation Example&nbsp;
<OPTION>Excel Development&nbsp;
<OPTION>Email Me&nbsp;
<OPTION>Back to Main Page&nbsp;

</SELECT></FORM>
 

back to top
 
 
 
 
 
 
 
 
 
 
 
 

Copy this script to the area that you would like to use the button.
 

<form>
<input type = "button" value="Button Title" OnClick ="location.href='yourpagenamehere.htm'">
</form>

back to top
 
 
 
 
 
 
 
 
 
 
 
 

Simply paste this code wherever you want to a button to display an alert:
 

<form>
<input type = "button" value="Button Title" OnClick ="alert('Here you type your text and you can place here whatever warning you want!!!!!!!')">
</form>

back to top
 
 
 
 
 
 
 
 
 
 
 
 
 

Copy this code at the end of your document just before the </body> tag.
 
 

<div id="waterMark" style="position:absolute"><a href="javascript:void(0)" ONCLICK="open('yourpagename.htm','yourtitleforpage','toolbar=0,location=0,resizable=1,width=300,height=250')">
<img src="yourimagename.gif" width=39 height=64 alt="Any caption you want!!!" border=0></a>

<script language="JavaScript1.2">
<!--
// Watermark Script

markW = 39;       // enter how many pixels wide your image is
markH = 64;       // enter how many pixels high your image is
markX = 100;      // percent right
markY = 100;      // percent down
markRefresh = 20; // milliseconds

// set common object reference
if (!document.all) document.all = document;
if (!document.all.waterMark.style) document.all.waterMark.style = document.all.waterMark;

wMark = document.all.waterMark.style;
wMark.width = markW;
wMark.height = markH;
navDOM = window.innerHeight; // Nav DOM flag

function setVals() {
 barW = 0; // scrollbar compensation for PC Nav
 barH = 0;
 if (navDOM) {
  if (document.height > innerHeight) barW = 20;
  if (document.width > innerWidth) barH = 20;
  } else {
  innerWidth = document.body.clientWidth;
  innerHeight = document.body.clientHeight;
  }
 posX = ((innerWidth - markW)-barW) * (markX/100);
 posY = ((innerHeight - markH)-barH) * (markY/100);
 }

function wRefresh() {
 wMark.left = posX + (navDOM?pageXOffset:document.body.scrollLeft);
 wMark.top = posY + (navDOM?pageYOffset:document.body.scrollTop);
 }

function markMe() {
 setVals();
 window.onresize=setVals;
 markID = setInterval ("wRefresh()",markRefresh);
 }

window.onload=markMe; // safety for Mac IE4.5

//-->
</script>

back to top
 
 
 
 
 
 
 
 
 
 
 
 

Copy this code into the head section of your page:

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function addChar(input, character) {
if(input.value == null || input.value == "0")
input.value = character
else
input.value += character
}
function cos(form) {
form.display.value = Math.cos(form.display.value);}
function sin(form) {
form.display.value = Math.sin(form.display.value);}
function tan(form) {
form.display.value = Math.tan(form.display.value);}
function sqrt(form) {
form.display.value = Math.sqrt(form.display.value);}
function ln(form) {
form.display.value = Math.log(form.display.value);}
function exp(form) {
form.display.value = Math.exp(form.display.value);}
function sqrt(form) {
form.display.value = Math.sqrt(form.display.value);}
function deleteChar(input) {
input.value = input.value.substring(0, input.value.length - 1)
}
function changeSign(input) {
if(input.value.substring(0, 1) == "-")
input.value = input.value.substring(1, input.value.length)
else
input.value = "-" + input.value
}
function compute(form)  {
form.display.value = eval(form.display.value)}
function square(form)  {
form.display.value = eval(form.display.value) *
eval(form.display.value)}
function checkNum(str)  {
for (var i = 0; i < str.length; i++) {
var ch = str.substring(i, i+1)
if (ch < "0" || ch > "9") {
if (ch != "/" && ch != "*" && ch != "+" && ch !=
"-" && ch != "."
&& ch != "(" && ch!= ")") {
alert("invalid entry!")
return false
         }
      }
   }
return true
}
// End -->
</SCRIPT>
 

back to top
 
 
 
 
 
 
 
 
 
 
 
 

Copy this calculator code into the body of the document:

<SCRIPT LANGUAGE="JavaScript"><!--setStartState()// --></SCRIPT>

<form>
<table BORDER="1" COLS=1 WIDTH="30%" >
<tr>
<td>
<input name="display" value="0" size=30>
</td>
</tr>
</table>

<table BORDER="1" COLS=5 WIDTH="30%" >
<tr>

<td>
<input type="button" value=" exp " onClick="if (checkNum(this.form.display.value)) { exp(this.form) }">
</td>

<td>
<input type="button" value="   7   " onClick="addChar(this.form.display, '7')">

</td>

<td>
<input type="button" value="   8   " onClick="addChar(this.form.display, '8')">

</td>

<td>
<input type="button" value="   9   " onClick="addChar(this.form.display, '9')">
</td>

<td>
<input type="button" value="   /   " onClick="addChar(this.form.display, '/')">
</td>

</tr>

<tr>

<td>
<input type="button" value="  ln   " onClick="if (checkNum(this.form.display.value)) { ln(this.form) }">

</td>

<td>
<input type="button" value="   4   " onClick="addChar(this.form.display, '4')">
</td>

<td>
<input type="button" value="   5   " onClick="addChar(this.form.display, '5')">
</td>

<td>
<input type="button" value="   6   " onClick="addChar(this.form.display, '6')">
</td>

<td>
<input type="button" value="   *   " onClick="addChar(this.form.display, '*')">
</td>

</tr>

<tr>

<td>
<input type="button" value=" sqrt " onClick="if (checkNum(this.form.display.value)) {cos(this.form) }">
</td>

<td>
<input type="button" value="   1   " onClick="addChar(this.form.display, '1')">
</td>

<td>
<input type="button" value="   2   " onClick="addChar(this.form.display, '2')">
</td>

<td>
<input type="button" value="   3   "  onClick="addChar(this.form.display, '3')">
</td>

<td>
<input type="button" value="   -   "  onClick="addChar(this.form.display, '-')">
</td>

</tr>

<tr>

<td>
<input type="button" value="  sq  " onClick="if (checkNum(this.form.display.value)) { square(this.form) }">
</td>

<td>
<input type="button" value="   0   " onClick="addChar(this.form.display, '0')">
</td>

<td>
<input type="button" value="    .   " onClick="addChar(this.form.display, '.')">
</td>

<td>
<input type="button" value="  +/-  " onClick="changeSign(this.form.display)">
</td>

<td>
<input type="button" value="   +  " onClick="addChar(this.form.display, '+')">
</td>

</tr>

<tr>

<td>
<input type="button" value="   (   " onClick="addChar(this.form.display, '(')">
</td>

<td>
<input type="button" value=" cos  " onClick="if (checkNum(this.form.display.value)) { cos(this.form) }">
</td>

<td>
<input type="button" value=" sin  " onClick="if (checkNum(this.form.display.value)) { sin(this.form) }">
</td>

<td>
<input type="button" value=" tan  " onClick="if (checkNum(this.form.display.value)) { tan(this.form) }">
</td>

<td>
<input type="button" value="   )   " onClick="addChar(this.form.display, ')')">
</td>

</tr>

</table>

<table BORDER="1" COLS=3 WIDTH="30%" >

<tr>

<td>
<input type="button" value="   Clear   "  onClick="this.form.display.value = 0 ">
</td>

<td>
<input type="button" value="   Back    " onClick="deleteChar(this.form.display)">
</td>

<td>
<input type="button" value="   Enter  " name="enter" onClick="if (checkNum(this.form.display.value)) { compute(this.form) }">
</td>

</tr>

</table>
</form>

back to top
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Paste everything into a new blank notepad document and Save As "notepad.htm"



<HTML> 
<HEAD> 
<TITLE>notepad</TITLE> 

<SCRIPT LANGUAGE="JavaScript"> 
function nameDefined(c,n) { 
 var s=removeBlanks(c) 
 var pairs=s.split(";") 
 for(var i=0;i<pairs.length;++i) { 
  var pairSplit=pairs[i].split("=") 
  if(pairSplit[0]==n) return true 
 } 
 return false 
} 
function removeBlanks(s) { 
 var temp="" 
 for(var i=0;i<s.length;++i) { 
  var c=s.charAt(i) 
  if(c!=" ") temp += c 
 } 
 return temp 
} 
function getCookieValue(c,n) { 
 var s=removeBlanks(c) 
 var pairs=s.split(";") 
 for(var i=0;i<pairs.length;++i) { 
  var pairSplit=pairs[i].split("=") 
  if(pairSplit[0]==n) return pairSplit[1] 
 } 
 return "" 
} 
<!-- 
// --> 
</SCRIPT> 

<SCRIPT LANGUAGE="JavaScript"><!-- 
function loadNotes() { 
 var cookie=document.cookie 
 if(nameDefined(cookie,"Notes")) { 
  notes=getCookieValue(cookie,"Notes") 
  notes=decode(notes) 
 }else notes="" 
 document.forms[0].notesArea.value=notes 
} 
function saveNotes() { 
 notes=window.document.forms[0].notesArea.value 
 notes=encode(notes) 
 var newCookie = "Notes="+notes+"; expires=" 
 newCookie += "Tuesday, 08-Nov-10 23:12:40 GMT" 
 document.cookie=newCookie 
} 
function encode(s) { 
 t="" 
 for(var i=0;i<s.length;++i) { 
  ch=s.charAt(i) 
  if(ch=="/") t += "//" 
  else if(ch==" ") t += "/b" 
  else if(ch==",") t += "/." 
  else if(ch==";") t += "/:" 
  else if(ch=="\n") t += "/n" 
  else if(ch=="\r") t += "/r" 
  else if(ch=="\t") t += "/t" 
  else if(ch=="\b") t += "/b" 
  else t += ch 
 } 
 return t 
} 
function decode(s) { 
 // Decode the encoded cookie value 
 t="" 
 if(s==null) return t 
 for(var i=0;i<s.length;++i) { 
  var ch=s.charAt(i) 
  if(ch=="/") { 
   ++i 
   if(i</SCRIPT> 
</HEAD> 

<BODY> 
<FORM> 
<P>Write some notes down that you may want to use at a later date. 
 These notes will be saved as a cookie on your hard drive. 
</P> 
<CENTER> 
<INPUT NAME="save" TYPE="BUTTON" VALUE="Save Notes Now!" ONCLICK="saveNotes()"> 
</CENTER> 
<TEXTAREA NAME="notesArea" ROWS="12" COLS="45"> 
</FORM> 
<SCRIPT LANGUAGE="JavaScript"></SCRIPT> 
</BODY> 
</HTML> 

back to top
 
 
 
 
 
 
 

Copy this script to the area that you would like and change the text within the (' ') tags only.


<script>
	bVer = parseInt( navigator.appVersion );

if( navigator.appName == "Netscape" && bVer >= 3 )
	{
	document.write ('You are using your Netscape Verion ' + bVer);
	document.write ('<P><HR>Type text or html in right here!</P>');
	document.write ('<P><img src="document.gif"></P>');
	}
else if( navigator.appName == "Microsoft Internet Explorer" && bVer >= 4)
	{
	document.write ('You have Internet Explorer ' + bVer)
	document.write ('<P><HR>Type text or html in right here!</P>');
	document.write ('<P><img src="clip.gif"></P>');
	}
else
	document.write ('I have now idea what browser you are using!!!')
</script>

back to top
 
 
 
 
 
 
 
 
 
 

This is the watermark example!