Java Script Tutorials [External Files]

Say you have 50 html files, and each one has a scroll bar code in it, now you want to change your layout, how long would it take you to change all 50 html pages? Well this is how you can change any amount of html files in seconds.

You can take alomost any JS code in out of your page and make it a separate file. This is very usefull if you have many html files with the same JS code in it. You can set it up where all your html files refrence to one extenal JS file. Then you can alter that one JS file and then all the html files using that file will have then changed.

Say you had the following code in your HTML file, in this case it is an alert message:

<SCRIPT language=JavaScript>
alert('Message here! ');

</SCRIPT>

What you would want to do is copy the bold section of the code and paste it into a blank notepad file. Then save it as pop.js.

Now put the following code into a blank HTML document:

<script src="pop.js" language="Javascript"></script>

Now that code will bring in the JS file into the HTML file and the popup will work.

If u need any help post in the forums