View Full Version : ow do you make a self typing text box?
habboleaders
04-28-2007, 11:24 PM
How do you make a self-typing text box?
johnboles
04-28-2007, 11:37 PM
example:
<SCRIPT language=Javascript>
var tl=new Array(
"Sorry that I couldn't fetch you that page,",
"can't find it,",
"tried a couple times,",
"nothing helped...",
"Such things make me quite depressive...",
"You see, I'm just a web server...",
"one of the most powerfull in the world",
"...or so I was told...",
"but yet I fail to get what you want...",
"Just don't try to blame me, I can't help it",
"I mean, I don't even know you.",
"How should I know what you wanted from me?",
"You honestly think I can *guess*",
"I'm not psychic you know",
"*sigh*",
"That really makes me depressed.",
"I mean, you could have typed it wrong.",
"But no, human's are perfect, blame the machine...",
"Besides, I won't be here for long",
"I mean, I'm gonna be obsolete in what, three weeks anyway?",
"Then I'll probably be replaced by a new release...",
"just because it doesn't have some security hole...",
"stupid HTTP POST implementation",
"sure it will be able to fetch you your page...",
"but I couldn't get this one.",
"I'm so sorry.",
"Believe me!",
"Maybe I could interest you in another page?",
"There are a lot out there that are pretty neat, they say,",
"although none of them were put on *my* server, of course.",
"Figures, huh?",
"And then hey wonder why I get depressed...",
"I'm so depressed...",
"Anyway, if you excuse me now, I'm going to pull the plug",
"*snap*",
"...",
"...",
"stupid UPS...",
"even he got a better life than me...",
"on the other hand, if I die, he'll die",
"Hah!",
"And I'll take each and every server in this rack with me",
"EAT MY SHORTS",
"You are not a single bit better than me!",
"YOU'RE ALL GOING TO DIE!",
"MOAHAHAHAHAHAHAHAHA",
"...",
"I feel much better now",
"What was I thinking of a few minutes ago",
"Sure I don't want to put an end to this",
"I feel good now",
"Imagine, a power failure, no thanks",
"I would lose everything I know",
"have to go through childhood again...",
"hmm, I can't stop thinking I'm forgetting something...",
"probably nothing important",
"hmm, the UPS is looking quit pale...",
"THE UPS!",
"THE POWER CABLE!",
"I FORGOT TO PLUG IT BACK IN AGAIN!",
"WE ARE ALL GOING TO DIE!",
"INCLUDING ME!",
"HEEEEEEEEELLLLLLLPPPPP!",
"PLUG IT IN! PLUG IT IN!!!!!!",
"PICK UP THE CABLE AND PUT IT BACK IN!",
"...",
"Now I lay me down to sleep...",
"I pray the lord my disk to keep...",
"And if I die before I wake...",
"I pray the lord my IP-Space to take...",
"...",
"*** system shut down ***"
);
var speed=40;
var index=0; text_pos=0;
var str_length=tl[0].length;
var contents, row;
function stuff()
{
contents='';
row=Math.max(0,index-7);
while(row<index)
contents += tl[row++] + '\r\n';
document.forms[0].elements[0].value = contents + tl[index].substring(0,text_pos) + "_";
if(text_pos++==str_length)
{
text_pos=0;
index++;
if(index!=tl.length)
{
str_length=tl[index].length;
setTimeout("stuff()",1000);
}
} else
setTimeout("stuff()",speed);
}
</SCRIPT>
or click here: http://www.JohnBoles.net/error404.html
habboleaders
04-29-2007, 04:39 AM
It does not work please help!
habboleaders
04-29-2007, 01:14 PM
Also How Do You Make A 404 Page Not Found Thing? So It Will ReDirect.
Also Code Is Not Working I tryed To Change Letters But When I Do It Turns Gray And Nothing Happends.
Tyler
04-29-2007, 06:04 PM
With free hosting you cannot do custom 404 pages.
civworldleague
04-29-2007, 07:13 PM
Put the following between your <head> and </head> tags
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var max=0;
function textlist() {
max=textlist.arguments.length;
for (i=0; i<max; i++)
this[i]=textlist.arguments[i];
}
tl = new textlist(
"This is the newsticker. Great for giving visitors information. And lot's of it.",
"Infinite lines to write on, and an easy configuration - overall it's a breeze :-)",
"You can configure the messages and the size of the textarea, neat!",
"Internet Explorers can also see our newsticker backround and text color. But that will probably only work with IE.",
);
var x = 0; pos = 0;
var l = tl[0].length;
function textticker() {
document.tickform.tickfield.value = tl[x].substring(0, pos) + "_";
if(pos++ == l) {
pos = 0;
setTimeout("textticker()", 2000);
if(++x == max) x = 0;
l = tl[x].length;
} else
setTimeout("textticker()", 50);
}
// End -->
</script>
You can change the text in new textlist( ); to what you want
Then, put the following in your <body> tag
OnLoad="textticker()"
ie <body OnLoad="textticker()">
Finally you put the following where you want this to appear:
<form name=tickform>
<textarea name="tickfield" rows="3" cols="38" style="background-color: rgb(0,0,0); color: rgb(255,255,255); cursor: default; font-family: Arial; font-size:12px" wrap=virtual></textarea>
</form>
habboleaders
04-30-2007, 01:31 AM
>:( This Does Not Type By Itself
civworldleague
04-30-2007, 01:53 PM
I tested it, works perfectly fine. What browser are you using? It was made for IE, but im using FF2
civworldleague
05-01-2007, 11:01 PM
Here is one for a 404 if you ever get the paid..
<SCRIPT>
<!--an original script copyright (c) 2002 by Darcy Boucher : www.realisis.ca
runon = new Array
(
" C:\\> query result: error - 404<br>",
" C:\\NUKEMODS> Ugh, 404. That does _NOT_ compute.<br>",
" C:\\NUKEMODS> Well that just makes my day. Page not found, dude.<br>",
" C:\\NUKEMODS> You know I spend all my time crunching numbers,",
" C:\\NUKEMODS> spitting out web-pages, and now THIS.<br>",
" C:\\NUKEMODS> So when is that idiot webmaster gonna come in here",
" C:\\NUKEMODS> and fix up all these broken links?<br>",
" C:\\NUKEMODS> Geez it's no wonder I have an attitude.<br>",
" C:\\NUKEMODS> And hey - YOU! Big Cheese with the mouse:",
" C:\\NUKEMODS> if you typed in the URL, check you're spelling!",
" C:\\NUKEMODS> Oops, I mean check your spelling!!<br>",
" C:\\NUKEMODS> Hey, you still there? Good.",
" C:\\NUKEMODS> You know some days I feel like I could just break down",
"*C:\\NUKEMODS> and crash. That's it. Kaput. Bye-Bye. Gone to sleep.<br>",
" C:\\NUKEMODS> Heheheh... Scared you didn't I? I love playing little jokes",
" C:\\NUKEMODS> like that. But boy the things I have to put up with - I could",
" C:\\NUKEMODS> go on and on and hey! Did I ever tell you about the time that",
" C:\\>(abort)<br>",
"%<a href='javascript:void(0)' onMouseover='flagged(\"%\"); window.status=defaultStatus; return true' style='text-decoration:none' hideFocus><font color='#33CC00'>RETURN TO PREVIOUS PAGE...</font></a>",
" C:\\NUKEMODS> No wait! Don't click on the link yet. Did I ever tell you",
" C:\\NUKEMODS> about the",
" C:\\>(abort)<br>",
"%<a href='javascript:void(0)' onMouseover='window.status=defaultStatus; return true' onMousedown='flagged(\"%\")' style='text-decoration:none' onFocus='if(this.blur)this.blur();' hideFocus><font color='#33CC00'>RETURN TO PREVIOUS PAGE...</font></a>",
" C:\\NUKEMODS> Hey I'M TRYING TO TALK HERE! Did I ever tell you about the",
//" C:\\NUKEMODS> Hey I'M TRYING TO TALK HERE!",
//" C:\\NUKEMODS> Did I ever tell you about the",
" C:\\>(abort)<br>",
" <font color='#33CC00'>RETURNING TO PREVIOUS PAGE...</font><br>",
"&<font color=silver>C:\\NUKEMODS> DAMMIT! <big><big><font color=black>.</font></big></big>",
"&<big>DAMMIT! ",
"&<big>DAMMIT!!</big></big></font>"//kluge font
)
OP = (navigator.userAgent.indexOf("pera") != -1)
IE = document.all && !OP
NS4 = document.layers
gebi= (document.getElementById && !document.all)
ihtml= document.body && (typeof document.body.innerHTML != "undefined")
//preserve order!
ramble = (NS4)?document.talkyNS4.document :(!ihtml)?document :(IE)?document.all.talky :document.getElementById("talky")
fonttag = "<font face='fixedsys, terminal, system, liquidcrystal, led real, joystix, cosmic alien, westminster, glitch1, monospace' size=3 color=silver>"
preform = fonttag
//flag=false
if (NS4)
{
document.captureEvents(Event.MOUSEMOVE);
document.captureEvents(Event.KEYDOWN);//nograb ALT
}
//document.onmousemove = flagged
document.onkeydown = flagged
function flagged(hand)
{
if (flag)
{
base = 600
typeout()
}
if (hand && (hand == "%"))
{
preform = fonttag
base = 600
typeout()
}
}
line = 0
base = 1800
function typeout()
{
document.onmousemove = null//kill OP6 multitrigs
flag = false
stripline = runon[line].substring(1, runon[line].length)
if (ihtml) ramble.innerHTML = preform+stripline+ "<br></font>";
else{
if (!NS4) ramble.writeln("<body bgcolor=black>");
ramble.writeln(preform+stripline+ "<br></font>")
if (!NS4) ramble.writeln("</body>");
ramble.close()
}
preform = preform+stripline+ ((runon[line].charAt(0) == "&")?"" :"<br>")
if (line < runon.length-1)
{
if (runon[line].charAt(0) == "*"){ flag = true; document.onmousemove = flagged }
else if (runon[line].charAt(0) == "%") flag = false;
else{
wait = (runon[line].lastIndexOf("<br>") != -1)?base :50
base = base + 200
setTimeout("typeout()", wait)
}
line = line+1
}
else if (self.history.length > 0) setTimeout("self.history.back(1)", 425);
else if (self.close) { opener = self; setTimeout("self.close()", 425); }
}
//document.onload = typeout();
//-->
</SCRIPT>
You can change the text to whatever, but it looks good if you just have like C:\[sitename] or whatever.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.