You don't need to be a programmer to use javascript on your website. If you can cut-n-paste...you can add javascript to your site.
All the code you need is included in every .zip file you download from our site,
JavaFILE.com. When you unzip the file, you will notice 2 files: a .txt and .htm file. Note,
some files also contain images for certain scripts and we'll deal with that later in the
tutorial. The 2 files contain the same code. We gave you one file as a .htm file in order for you to be able to see how the script works on a webpage. The .txt version is the same code. If you like the way the script looks in the webpage, you can just cut and paste directly from the .txt file.
However, if there are some changes you'd like to make to the look, you'll need to doctor up the code first. The first thing you'll want to do is open the .htm file in your web page editor and make any changes you want to the way the code looks on a webpage. For instance, if the code includes text that shows up on your webpage, you might want to change the font size, face, color, etc. Now that you have it looking the way you want it, you need to install it into your existing webpage. This is easy. Just view the source (html code) of the webpage you've just worked on and see how the script is incorporated into the head and /or body tags of the page. Then duplicate this on your existing webpage using cut and paste.
The 2 parts to
Javascript
Sometimes, there are 2 parts to a javascript. Part 1 goes between the <Head> and
</Head> tags of your page, and part 2 goes in the <Body>
of your document. Confused yet? Don't be...like I said before, just view the source of the
.htm file to see how it's done...it's not difficult. Just see how the code is included in the sample .htm page and then insert it into your page the same way.
Changing the script
and using images
Depending on the script, there will normally be 4 things you will want to
change to make it fit your site. We'll explain each one of these.
1: any reference to url's.
2: text and background colors.
3: text that the script uses.
4: the url to the images you are using.
Once again,
the easiest way to perform these tasks is to open the .htm file and make the changes in your web page editor. Or if you feel comfortable enough dealing with html, you can go into the .txt file and make the changes directly.
1: To change the reference to url's, simply open the file and substitute "your
url" for the ones in it now.
2: Text and Background colors may be changed by looking for the color codes. These
codes will look something like: <font color="000000"> This means the color
of the font is Black. <bgcolor="FFFFFF"> This is a white background.
3: Obviously, you want your
site name or your message on the page instead of the one we put there for an example. You will probably be able to make these changes using your web page editor. If not, you'll need to view the source of the script to make these changes. Some
reference might need to be changed in both the <head> part of the script, and the
<body> part of the script. The best way to do this is to run the script "as
is", then change the lines of text that you want to change by viewing the source and
replacing the text with yours. I suggest changing one line...trying the script...then
changing the rest if it worked :) don't worry, it will. And if for some reason, it doesn't, don't panic, just take out the changes you made and re-input them. You probably made some minor mistake that caused the problem.
4: Some scripts use images, so you will have to tell the web browser where to find
them. Once you do
that, simply change the img src tag to reflect where your image(s) are stored.
Example: <img src="http://www.YOURSITE.com/images/dogimage.gif.>