Notices

Forum Testing Use to test signatures and such.

Reply
 
LinkBack Thread Tools
Old 10-21-03, 11:10 PM   #1 (permalink)
micahlegg
Guest
 
Posts: n/a
Javascript Test................

Just testing if i can put some javascript on this board.......:D
Gotta love Javascript.:D



<HEAD>

<SCRIPT LANGUAGE="JavaScript">


<!-- Begin
function MakeArrayday(size) {
this.length = size;
for(var i = 1; i <= size; i++) {
this[i] = "";
}
return this;
}
function MakeArraymonth(size) {
this.length = size;
for(var i = 1; i <= size; i++) {
this[i] = "";
}
return this;
}
function funClock() {
if (!document.layers && !document.all)
return;
var runTime = new Date();
var hours = runTime.getHours();
var minutes = runTime.getMinutes();
var seconds = runTime.getSeconds();
var dn = "AM";
if (hours >= 12) {
dn = "PM";
hours = hours - 12;
}
if (hours == 0) {
hours = 12;
}
if (minutes <= 9) {
minutes = "0" + minutes;
}
if (seconds <= 9) {
seconds = "0" + seconds;
}
movingtime = "<b>"+ hours + ":" + minutes + ":" + seconds + " " + dn + "</b>";
if (document.layers) {
document.layers.clock.document.write(movingtime);
document.layers.clock.document.close();
}
else if (document.all) {
clock.innerHTML = movingtime;
}
setTimeout("funClock()", 1000)
}
window.onload = funClock;
// End -->
</script>
</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document -->

<BODY>

Currently, it's <span id=clock style="position:relative;"></span>

<p><center>
<font face="arial, helvetica" size="-2">Micah clock<br>
<a href=""></a></font>
</center><p>

<!-- Script Size: 1.66 KB -->
  Reply With Quote
Sponsor Ads
Old 10-21-03, 11:11 PM   #2 (permalink)
micahlegg
Guest
 
Posts: n/a
ehh, hmm, lemme try again..........
  Reply With Quote
Old 10-21-03, 11:13 PM   #3 (permalink)
davich
Guest
 
Posts: n/a
did not see it..

by the way did you used to have a different handle?
  Reply With Quote
Old 10-21-03, 11:13 PM   #4 (permalink)
micahlegg
Guest
 
Posts: n/a
<HEAD>

<SCRIPT LANGUAGE="JavaScript">


<!-- Begin
var n;
var p;
var p1;
function ValidatePhone(){
p=p1.value
if(p.length==3){
//d10=p.indexOf('(')
pp=p;
d4=p.indexOf('(')
d5=p.indexOf(')')
if(d4==-1){
pp="("+pp;
}
if(d5==-1){
pp=pp+")";
}
//pp="("+pp+")";
document.frmPhone.txtphone.value="";
document.frmPhone.txtphone.value=pp;
}
if(p.length>3){
d1=p.indexOf('(')
d2=p.indexOf(')')
if (d2==-1){
l30=p.length;
p30=p.substring(0,4);
//alert(p30);
p30=p30+")"
p31=p.substring(4,l30);
pp=p30+p31;
//alert(p31);
document.frmPhone.txtphone.value="";
document.frmPhone.txtphone.value=pp;
}
}
if(p.length>5){
p11=p.substring(d1+1,d2);
if(p11.length>3){
p12=p11;
l12=p12.length;
l15=p.length
//l12=l12-3
p13=p11.substring(0,3);
p14=p11.substring(3,l12);
p15=p.substring(d2+1,l15);
document.frmPhone.txtphone.value="";
pp="("+p13+")"+p14+p15;
document.frmPhone.txtphone.value=pp;
//obj1.value="";
//obj1.value=pp;
}
l16=p.length;
p16=p.substring(d2+1,l16);
l17=p16.length;
if(l17>3&&p16.indexOf('-')==-1){
p17=p.substring(d2+1,d2+4);
p18=p.substring(d2+4,l16);
p19=p.substring(0,d2+1);
//alert(p19);
pp=p19+p17+"-"+p18;
document.frmPhone.txtphone.value="";
document.frmPhone.txtphone.value=pp;
//obj1.value="";
//obj1.value=pp;
}
}
//}
setTimeout(ValidatePhone,100)
}
function getIt(m){
n=m.name;
//p1=document.forms[0].elements[n]
p1=m
ValidatePhone()
}
function testphone(obj1){
p=obj1.value
//alert(p)
p=p.replace("(","")
p=p.replace(")","")
p=p.replace("-","")
p=p.replace("-","")
//alert(isNaN(p))
if (isNaN(p)==true){
alert("Check phone");
return false;
}
}
// End -->
</script>

</HEAD>

<BODY>

<div align="center">
<form name=frmPhone>
<font size="4" color="#0000FF"><b>Enter Telephone Number to be tracked down with:</b></font><br>
(To refresh, hold down shift and press the browser refresh button)<br>
<input type=text name=txtphone maxlength="13" onclick="javascript:getIt(this)" >
</form>
</div>


<p><center>
<font face="arial, helvetica" size"-2">You will be assimillated.<br>
<a href=""></a></font>
</center><p>

<!-- Script Size: 2.70 KB -->

Last edited by micahlegg; 10-21-03 at 11:24 PM.
  Reply With Quote
Old 10-21-03, 11:14 PM   #5 (permalink)
micahlegg
Guest
 
Posts: n/a
WOW!!! javascript works on here! woooHOOOOO!!!!
  Reply With Quote
Old 10-21-03, 11:15 PM   #6 (permalink)
micahlegg
Guest
 
Posts: n/a
Another test. This is a fortune cookie game. Just click where it says, and have fun!


<!-- TWO STEPS TO INSTALL FORTUNE COOKIE:

1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original: John Hobbs (jaalibbrandl@hotmail.com) -->
<!-- Web Site: http://jsquared.faithweb.com -->
<!-- Check out: http://jsquared.faithweb.com/cookie/fortune.html for a neat layout -->

<!-- Begin
var quotes = new Array(12) //Add your quotes below
quotes[0]="Your talents will be recognized and suitably rewarded.";
quotes[1]="He who hurries cannot walk with dignity.";
quotes[2]="Your success in life must be earned with earnest efforts.";
quotes[3]="You love peace.";
quotes[4]="A friend asks only for your time and not your money.";
quotes[5]="You will soon inherit a piece of land.";
quotes[6]="Your luck is about to change.";
quotes[7]="Things will soon go your way.";
quotes[8]="He who stands on toilet is high on pot.";
quotes[8]="Everybody is ignorant, only on different subjects.";
quotes[9]="Fortune favors the brave.";
quotes[10]="There is nothing permanent except change.";
quotes[11]="You haven't failed until you give up.";

function fortune() {
var rand_int = Math.floor(Math.random()*12); //Get a number for picking the quote
document.all.myspan.innerHTML=(quotes[rand_int]); //Put the quote in the box
}
function numberstoo() {
var space = (' ') //Spacer for between numbers
var rand_inta = Math.floor(Math.random()*100); //Get first number
var rand_intb = Math.floor(Math.random()*100); //Get second number
var rand_intc = Math.floor(Math.random()*100); //Get third number
var rand_intd = Math.floor(Math.random()*100); //Get fourth number
var rand_inte = Math.floor(Math.random()*100); //Get fifth number
document.all.myspant.innerHTML=(rand_inta+space+ra nd_intb+space+rand_intc+space+rand_intd+space+rand _inte); //Print it all into the second box
}
// End -->
</script>

</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document -->

<BODY>

<div align="center">
<a onclick="fortune()"><b>Click for your fortune:</b></a><br>
<span id="myspan"></span>
<p>
<p>
<a onclick="numberstoo()"><b>Click for your numbers:</b><br>
</a><span id="myspant"></span>
</div>


<p><center>
<font face="arial, helvetica" size"-2"><br>
<a href=""></a></font>
</center><p>

<!-- Script Size: 2.67 KB -->
  Reply With Quote
Old 10-21-03, 11:17 PM   #7 (permalink)
micahlegg
Guest
 
Posts: n/a
Darn, it is still messed. hmmmmmmmmmm......


<!-- THREE STEPS TO INSTALL RANDOM TEXT SCROLL:

1. Copy the coding into the HEAD of your HTML document
2. Add the onLoad event handler into the BODY tag
3. Put the last coding into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original: Jeffery P Sanders (jeff.sanders@distran.com) -->
<!-- Web Site: http://www.geocities.com/jeffery_p_sanders/ -->

<!-- Begin
var quoteStr;
var quoteNum;
var quoteDis;
var quoteLen;
var quoteLoc;
var quotePic;
var quoteMax;
var numQuote;

function funcQuote() {
this[0] = "There is only one way to describe this...BEAUTIFUL!";
this[1] = "A lot of people mistake a short term memory for a clear conscience.";
this[2] = "Friends help you move. REAL friends help you move bodies.";
this[3] = "LOTTERY: A tax on people who are bad at math.";
this[4] = "Save the whales. Collect the whole set.";
this[5] = "A man needs a good memory after he has lied.";
this[6] = "Always remember that your are unique, just like everyone else.";
this[7] = "Pentiums melt in your PC, not in your hand.";
this[8] = "OOPS! My brain just hit a bad sector.";
this[9] = "90% of all statistics are made up.";
this[10] = "Warning: Dates in calendar are closer than they appear.";
this[11] = "Don't take it too seriously, you won't get out alive.";
this[12] = "COINCIDENCE happens.";
this[13] = "A flashlight is a case for holding dead batteries.";
this[14] = "Few women admit their age. Few men act theirs.";
this[15] = "Give me ambiguity or give me something else.";
this[16] = "C program run. C program crash. C programmer quit.";
this[17] = "Did anyone see my lost carrier?";
this[18] = "I used to have a handle on life. Then it broke.";
this[19] = "Beam me aboard, Scotty.....Sure,... will a 2x4 do?";
this[20] = "Double your drive space - delete windows.";
this[21] = "A little work, a little sleep, a little love and it's all over.";
this[22] = "Artificial intelligence usually beats real stupidity.";
this[23] = "Change is unevitable, except from a vending machine.";
this[24] = "I.R.S.: We've got what it takes to take what you've got.";
this[25] = "I don't suffer from insanity. I enjoy every minute of it.";
this[26] = "Energizer Bunny Arrested! Charged with battery.";
this[27] = "The gene pool could use a little chlorine.";
this[28] = "We are born naked, wet, and hungry. Then things get worse.";
}
function getQuote() {
quoteLen = 0;
quoteLoc = 0;
quoteNum = Math.floor(Math.random() * numQuote);
quoteStr = makeQuote[quoteNum];
quoteLen = quoteStr.length;
padQuote();
}

function disQuote() {
quoteLoc = quoteLoc + 1;
if (quoteLoc > quoteMax) {
getQuote();
}
quoteDis = quoteStr.substring(0, quoteLoc);
for (var i = quoteLoc; i < quoteMax; i++){
var charone;
charone = quoteStr.substring(i, i + 1);
var rdnum;
rdnum = Math.floor(Math.random() * 57)
if (charone != " "){
quoteDis = "" + quoteDis + quotePic.substring(rdnum, rdnum + 1);
} else {
quoteDis = "" + quoteDis + " ";
}
}
}
function padQuote () {
var spacePad = quoteMax - quoteStr.length;
var frontPad = Math.floor(spacePad / 2);
for (var i = 0; i < frontPad; i++) {
quoteStr = " " + quoteStr;
}
for (var i = quoteStr.length; i < quoteMax; i++) {
quoteStr= "" + quoteStr + " ";
}
}
function loopQuote() {
document.RandomText.box1.value=quoteDis;
disQuote();
setTimeout ("loopQuote();", 100);
}
function startQuote() {
quoteStr = "";
quoteNum = 0;
quoteDis = "";
quoteLen = 0;
quoteLoc = 0;
quotePic = "abcdefghjkmnopqrstuvwxyzABCEDEFGHJKLMNOPQRSTUVXYZ 234567890";
quoteMax = 70;
numQuote = 29;
makeQuote = new funcQuote();
getQuote();
disQuote();
loopQuote();
}
// End -->
</script>

</HEAD>

<!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->

<BODY onLoad="startQuote();">

<!-- STEP THREE: Copy this code into the BODY of your HTML document -->

<form name="RandomText">
<div align="center"><center><p><input type="text" size="70" name="box1"> </p>
</center></div>
</form>


<p><center>
<font face="arial, helvetica" size"-2">Enter Text ^^<br>
by <a href=""></a></font>
</center><p>

<!-- Script Size: 4.47 KB -->

Last edited by micahlegg; 10-21-03 at 11:23 PM.
  Reply With Quote
Old 10-21-03, 11:19 PM   #8 (permalink)
micahlegg
Guest
 
Posts: n/a
Quote:
Originally posted by davich
did not see it..

by the way did you used to have a different handle?
Yea, some spammer spammed me, forcing me to change my name.


I used to be: Micahlegg
  Reply With Quote
Old 10-21-03, 11:22 PM   #9 (permalink)
micahlegg
Guest
 
Posts: n/a
For some reason it works, and then it doesent.
Wierd................:crooked:
  Reply With Quote
Old 11-16-03, 09:40 PM   #10 (permalink)
Aximsite Prospect
 
Honda_Civic_si's Avatar
DAP Site StaffDAP Site StaffDAP Site Reviewer
 
Join Date: Nov 2003
Location: Canada!
Posts: 20
Thanked 0 Times in 0 Posts
maybe the java code is wrong?
__________________
<a href="
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
src="http://aeriostyle.com/fullsize/34_383.jpg"border=0>
Honda_Civic_si is offline   Reply With Quote
Old 11-17-03, 12:53 PM   #11 (permalink)
micahlegg
Guest
 
Posts: n/a
No, the java code is fine. I even put it up on my website.
Ohh well, it doesent matter.
  Reply With Quote
Reply

Sponsor Ads

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:15 PM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Copyright © 2003-09 LeckMedia, LLC