Tour of Our Labs
(Lesson 3)

We have two laboratories available for this class. Both of them can be used to easily test simple scripts. I will give you a tour of both labs and let you decide which one to use for this class.


Tour of Lab 1

Lets look at Lab 1 first.  You will need to do some setup to use this laboratory.  Once setup, you will save it to your hard drive where it will be ready to use anytime you want. To set up Lab 1,  first open your text editor and type in the HTML source code shown below Then, save the file as lab1.htm.


 <HTML>
 <HEAD>
 <TITLE>Lab 1</TITLE>
 </HEAD>

 <BODY bgcolor="white">

 <SCRIPT language="JavaScript">
 <!-- 

 //-->
 </SCRIPT>

 </BODY>
 </HTML>
 


The code you just saved is a template for you to use to test JavaScript. There is a pair of <SCRIPT> tags already in the BODY section. I did not put any <SCRIPT> tags in the HEAD section since they will rarely be needed for the simple demos we will be doing during class. You of course can type one into the HEAD section anytime you need it.

Anytime you would like to test some JavaScript just type it into the proper place in the code and save it as a different name. Then load it into your browser to veiw/test the results.

Here is your first lab assignment using this lab. Type the following line between the <SCRIPT> tags that we have in our BODY section of our template:


 document.write("Hello World")

Save the file as lab1-expr1.htm. When you load this file into the browser you will of course get a one liner that reads Hello World.


Tour of Lab 2

Lab 2 is similar to the first Lab but I think is much easier to use. When you click on the button below that is marked - Lab - a pop-up window is displayed that you can test your JavaScript in.

The window is made up of two frames. The lower frame has a template identical to the one you used in Lab 1 already set-up for you. Try it out by putting the same line


 document.write("Hello World")

in it. When you click on the test button the results are displayed in the top frame.

The reset button clears the lower and top frames and makes the template ready for a new script.

If you want to save or print this script then you will have to highlight it and copy it into your text editor first.

A button to pop-up this Lab will be displayed on any page that I recommend that you test something in the Lab. Also, clicking on Lab in our navigation menu that is displayed on the left side of every lesson page will bring up the Lab any time you need it.

You may want to refer back to this page occasionally if you need to refresh your memory on how to use this Lab. I think it is pretty simple though and hopefully easy to use.


Follow Up

Either one of these Labs is a good place to test some of the things we will be doing in our lessons. I do encourage you to do the homework assignments using your text editor in order to completely understand how to set up and write JavaScript.




[ Top of Page  |  Contents ]