The pure html way (does it look ok?)
<div
align="center"> <marquee bgcolor="#000080" scrollamount="2"
direction="up" loop="true" width="35%"> <center>
<font color="#ffffff" size="+1"><strong> THIS
IS A COOL WAY<br> TO MAKE YOUR TEXT<br> SCROLL UPWARDS<br> <br>
IT IS EASY AND FAST LOADING </strong></font> </center> </marquee></div>
----------------------------------------------
Step 2: Type in the HTML code you want to include in the file, with proper formatting. You may already have existing code that you can just cut and paste into the text editor.
<center>
<p>
Copyright 2001
</p>
</center>
Step 3: Remove all the line breaks in the code. It must all be on one line or you'll get a JavaScript error on your page instead of copyright information.
<center><p>Copyright 2001</p></center>
This code may display on multiple lines in this newsletter story. Since the line is relatively long, your browser wraps the text just like it does in the rest of the story text. Just be absolutely sure it shows on a single line in your Notepad file.
Step 4: Enclose the HTML code inside a document.write statement. Be sure to place the HTML text inside single quotes
document.write('<center><p>Copyright 2001</p></center>')
You don't need to change any of the HTML code, just place it inside the JavaScript statement.
Careful using single quotes inside your text string. Always place a "\" in front of the single quotation mark. Otherwise, JavaScript will think you're trying to close the string prematurely and give you an error message.
Step 5: Save the file as a .txt file. We used "footer_no9.txt" as our file name.
If you wanted to insert a page header too, you'd just follow the same steps and insert the text and graphics you want as your page header. We used the following code and saved the file as "header.txt"
document.write('<center><img src="logo.gif" align="middle"><br><h1><font color="navy">I'm cool</font></h1></center>')
Now, you're ready to place them on your Web pages with JavaScript.
Call External Files With JavaScript
Although you can use this technique to insert code anywhere on your page, you'll probably want to insert the page header directly at the top of your page right after your opening BODY tag like this:
<BODY>
<script language="javascript" type="text/javascript" src="header.txt"></script>
The footer goes at the bottom of the page, right before the closing BODY tag:
<script language="javascript" type="text/javascript" src="footer.txt"></script>
</BODY>
NOTE PHP IS MUCH COOLER FOR INSERTING TEXT (AND IT RUNS ON THE SERVER SIDE)
View a sample page with the header and footer information. We kept it simple so you can easily look at the source code and see where the external files link to the page.
Be very careful when you're entering the file names and paths. If the path is incorrect, you may not get a JavaScript error - but you won't see the file content either! Netscape is particularly strict about file paths so always be sure to test your page in Netscape.