Jul 20, 2008

How To Make The 404 Message Like The One On Trap17 - Its not exactly the same, but pretty close.

Free Web Hosting, No Ads > CONTRIBUTE > Tutorials

free web hosting

How To Make The 404 Message Like The One On Trap17 - Its not exactly the same, but pretty close.

fsastraps
I came a cross a topic that asked how you could do the message on trap17's 404 page, and i found the code that would do this.

Well it works pretty much the same way, it only looks a little different, you might be able to change the background of the textarea to match the background, and you can possibly take the scrollbar off, and then i think it would look the same. but here it is:


CODE
<script type="text/javascript" language="Javascript">

var tl=new Array(

"Text Here!",
"Text for next line HERE!.",
"This would be the last line that would be shown, dont put a comma after the quotations, because it will cause an error"


);
var speed=80; //You can chage the speed at which the characters are typed in
var index=0; text_pos=0; //dont edit these settings
var str_length=tl[0].length;
var contents, row;


function type_text()
{
 contents='';
 row=Math.max(0,index-6);
 while(row<index)
   contents += tl[row++] + '\r\n';
 document.textform.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("type_text()",1500); //this is how much time will pass till the next line is shown
   }
 } else
   setTimeout("type_text()",speed);

}
function MM_callJS(jsStr)
{
//v2.0
  return eval(jsStr)
}
//-->
</script>
     <center>
     <form name="textform">
         <textarea cols="70" rows="8" wrap="soft" readonly>
         </textarea>
     </form>



Inside the body tag type in onload="type_text();"

And thats it! Hope you like it biggrin.gif

 

 

 


Reply

tonic
Hehe I like the Trap17 error page. Check out mine if you want hehe http://zhe.trap17.com/asdasd

Reply

Hamtaro
Hmm...thanks for that. Looks interesting! To change the background for the textarea, though, you need to remove the readonly for it. Also, is there any way to remove the small "border" that the textarea makes? I'm sorta wanting to remove it. Or is there at least a way to change it's color?

Reply

snlildude87
QUOTE(tonic @ Apr 27 2005, 09:45 PM)
Hehe I like the Trap17 error page. Check out mine if you want hehe http://zhe.trap17.com/asdasd
*

Your 404 page is very mean. Nice and catchy music, but mean. Why? It took me a good 5 minutes to realized that it repeats itself. sad.gif

Reply

fsastraps
Yeah i was looking at that two until i found it repeated! ahha

Well anyhow, you can change the background color by typing in:

<textarea cols="70" rows="8" wrap="soft" readonly style="background:orange"> i think in the style thing you can also take the scrollbar out, but i dont know how to do that.

Reply

Hamtaro
I'll use your code to explain this:

To remove the scrollbar, you just simply add scrolling="no".
So, this is the code:
<textarea cols="70" rows="8" wrap="soft" readonly style="background:orange" scrolling="no">

Reply

snlildude87
I'd like to add to fsastraps' tutorial.

With his code, the message box will be the first thing that appears in your 404 page. This is really bad for you if you have something else that you want to show first on the page. In my "mini-tutorial", I will show you how to position your 404 error anywhere on your page!

First, insert the following code between the HEAD tags:
CODE
<script type="text/javascript" language="Javascript">

var tl=new Array(

"Hi,",
"This is a 404 error message...",
"that you must place between your <head> </head> tags.",
"Remember not to put a comma at the end",
"or else it will not run :)"


);
var speed=80; //You can chage the speed at which the characters are typed in
var index=0; text_pos=0; //dont edit these settings
var str_length=tl[0].length;
var contents, row;


function type_text()
{
contents='';
row=Math.max(0,index-6);
while(row<index)
  contents += tl[row++] + '\r\n';
document.textform.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("type_text()",1500); //this is how much time will pass till the next line is shown
  }
} else
  setTimeout("type_text()",speed);

}
function MM_callJS(jsStr)
{
//v2.0
 return eval(jsStr)
}
//-->
</script>


Now, place the follow code ANYWHERE you want your message to appear:
CODE
<form name="textform">
<textarea cols="70" rows="8" wrap="soft" style="border: 0;" readonly></textarea>
</form>


Here is my 404 error. Feel free to look at the source code to see what I mean. smile.gif

 

 

 


Reply

wariorpk
Thanks alot for this great tutorial. It should help me out alot. Happy foruming.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : 404 message trap17

  1. Flatfile User Login/signup - Uses text files only (compatable with forums and message system) (24)
    With this tutorial, you will learn how to create a textfile login script. This user membership
    script is for use also with my forums and message system scripts. I will also give you the scripts
    to make it so that people can change their profiles. Ok, The first thing we need to do is make the
    database. To do this, create a blank text file called 'userdata.txt' , make sure it is ALL
    LOWER-CASE. Edit this file and put
    '**username|##|password|##|email|##|rank|##|userid|##|name|##|picture**'. This will not be
    used, however it will give you an idea of how the...
  2. Install An Aef Forum Onto The Trap17 - From a zip file (11)
  3. Transfering Hosting Credits Or Awarding Them - On Trap17 (3)
    A lot of people have asked me how to transfer hosting credits or just give them as a gift. I have
    made a tutorial on how to do this. 1.Click on the "Credits" Section in the NavBar at the top of the
    forum. 2.Click on the Transfer Credits Link in the Menu. 3.Read what it says to do, and do
    it. at the VERY bottom, it has how many credits you want to transfer. 4. The Credits are
    Transfered! I am dedicating this tutorial to Yratorm, LightMage, because he asked me how to
    transfer credits. Hope I help You!...
  4. Uploading Images To The Trap17 Gallery - A How To, on uploading images to the trap17 gallery (4)
    Well, seeing as how BuffaloHelp or OpaQue has told us to upload our images to the trap17 gallery
    instead of our own, i figure that i could help out those who dont know how to do it because it
    isn't all that easy for the noobs. Uploading Images To The Trap17 Gallery Step 1:..
    Obviously You need a picture so get one of those Step 2:.. Go to "My Controlls" Step 3:.. Once
    you get there, on the left hand side look for "Invision Gallery" Step 4:.. Click On "Your Albums"
    Step 5:.. Now you need to create an album so click on "Create My First Album" S...
  5. How To: Have Opera Check C-panel Webmail - Geared toward Trap17 users (1)
    This tutorial is valid for Opera 9 or above; but previous versions might work. In the menu bar,
    go to Tools > Mail and chat accounts... Click on Add... Make sure Regular e-mail
    (POP) is selected. (It should be by default.) Click Next > . In this section, you see three
    fields: Real Name , E-mail address , and Organization . Organization is
    optional. Type in your name in the Real Name field, and your account's e-mail in the
    E-mail address field (syntax: cpanel_username@your_subdomain.trap17.com). Click Next...
  6. How To Use Trap17 Cgi Formmail - a built-in script in every hosting (15)
    This tutorial is using TRAP17 hosting's built-in script called cgiemail. There are several
    hundreds of free scripts you can download and install it yourself but why not use what is already
    provided for you, if all you need is a simple submit and data collection? Let's begin. There
    are three things you need to remember: 1) you can rename the file however you'd like 2) two
    files (which I'll name them submitForm.html and template.txt ) must be in the same directory
    3) first two lines in template.txt must EXIST. Write your submitForm.html (where you ...



Looking for make, 404, message, trap17, pretty, close

Searching Video's for make, 404, message, trap17, pretty, close
advertisement



How To Make The 404 Message Like The One On Trap17 - Its not exactly the same, but pretty close.



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE