WEB DEVELOPMENT

The web development section will only breifly cover web development. This section will have five sections:
I. A couple pointers to sites with more training and advice on design
II. A brief introduction to HTML and Beyond.
III. A smattering of Javascript for dynamic affects on your pages
IV. How to turn a powerpoint presentation into a web presentation with nifty navigation bars
V. A brief introduction to developing a web SITE with dreamweaver

Section I. Pointers and sites:

We have covered the web in some detail, but now what?  How do we develop for the web.  Well, as expected there are hundreds of sites on web development. See:

for a simple example. Or for a more complete source:

Another popular site is webmonkey http://hotwired.lycos.com/webmonkey because it has extensive how-to documents and language reference manuals.

You really can learn nearly all of it at webmonkey. Note that macromedia (as in Dreamweaver) also has some really nice material: 

As one Juniata faculty noted, it doesn’t matter how you create a web page but rather what it looks like when you’re done.  Okay, we’ll focus on design issues, but first let’s look at our options for development.  In addition to the nifty url’s above, we’ll provide you with overviews of “how to” develop web sites using HTML, JavaScript, PowerPoint, and DreamWeaver.  You can then take your pick or even go elsewhere.  For example, you can always download HTML Kit from http://www.chami.com/html-kit/ and proceed to use HTML with the help of debugging and on-line help or you can download templates from DreamWeaver from http://www.macromedia.com/software/dreamweaver/download/templates and edit them (life is a lot easier if someone else has done the programming.)

II. HTML and Beyond

HyperText Markup Language (HTML) is the language of the internet, more specifically, it is a hypermedia document description language that is used to publish documents on the World Wide Web.  HTML files are in an ASCII format, meaning that you can use any old text editor to create an HTML file.  Simply use a text editor such as Notepad to create or edit HTML.  Save the file with an HTML file extension.  Then, examine the file with a browser such as Internet Explorer or Netscape.  Transfer the file to your web space (i.e. your website directory) and then use the browser to examine the page on its web space. 

Here is a simple HTML file:

<html>
<head>
<title>
This is a Simple HTML Page.
</title>
</head>
<body>
The body is the section where the text and graphics appears.  This is a simple page so we’ll start with text only. 
<h1>
This is what h1 looks like.
</h1>
<p>
Here we will place a new paragraph.
</p>
</body>
</html>

If you haven’t written basic HTML files before, simply copy the above into an editor and save it as an HTML file.  Then open it in MS Internet Explorer. An HTML file is composed of elements which represent various structures (such as a header), or a desired behavior (such as italic).  Most elements include a starting tag, content, and an ending tag.  HTML markup tags consist of a left bracket (<), followed by the tag name, and then a right bracket (>).  Tags usually are in pairs whereby the first tag indicates the start of an element and the second tag preceded by a slash (/) indicates the end.  For example,

<H1>A Sample Web Page</H1>
There are also certain HTML elements that do not hold any content.  These elements do not have any ending tags.  Examples include a horizontal rule (<HR>) and a line break (<BR>).Certain browsers may interpret certain commands differently or may not recognize certain commands.  For now, we’ll cover HTML coding for most web browsers.  So, here are a few universal HTML commands.

-  HTML identification <html> </html> identifies the beginning and end of your HTML code.

-  Header name <head> provides the header information for the page.

-  Title page <title> </title> specifies the title to be placed at the top of the browser window when the page appears.
-  Headings <h1> </h1>, <h2> </h2> etc through <h6> </h6> (capitalization is irrelevant)
-  Paragraphs <p> </p>
-  Horizontal Rules <hr>
-  Line Breaks <br>
-  Basic Text Styles <b> </b> for bold; <u> </u> for underline, <I> </I> for italic and
<em> </em> for emphasize

When you have more than one set of tags together, they must follow nesting rules.  In general, nesting rules tend to follow grammatical rules for brackets.  For example, {( xyz)}is correct but {( }) is incorrect.  Likewise, <b> <i>This is bold and italic</i> </b> is correct but ending with the sequence </b> </i> is incorrect.  Within an HTML document you can send the reader to another web page by using a hyper link.  An example follows: <p> If you want to learn more about HTML you can check out an <a href=http://htmlgoodies.earthweb.com/>HTML tutorial</a>.  There are several to choose from. If you prefer to have the user click on an icon rather than the term HTML tutorial, you can provide an image for them to click on to get them to the web page.  An example follows:

<a href=”home.html”> <img scr=”cabin.gif” width=”50” height=”55” alt=”cabin icon”></a>

Try putting the above options together in a web site that you can use!

Named anchors are similar to sending the user to a specific URL.  However, rather than redirecting them to another web page, you are simply directing them to a later section of your own web page.  See the following example:

<html>
<head>
<title> How to write HTML Code </title>
</head>
<body>
<h1 align=”center”>
How to Write HTML Code
</h1>
<p> Putting a named link into your html<p><ul>
<li>
<a href="#anchor">hyperlink</a>
</li>
</ul>
<p> Here you can add a bunch of stuff and the user can review this or simply click on the link which will send them to a named anchor.<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<p> .
<h3> <a name="anchor">hyperlink</a></h3>
<p> Yada yada
<p> .
<p> .
</body>
</html>

 

Simple Exercise - Copy the pieces of code above into NOTEPAD and save the file(s) as filename.html. Then open these files in a browser (e.g. IE Explorer). Do you see how the code works? Now change the code in NOTEPAD (add a phrase of your own) and save it again. Hitting REFRESH on your browser to update your changes. You have written HTML code for the web!

III. ENTER JAVASCRIPT

Now, to make your page more dynamic and interesting, enter JavaScript!

The most popular reason for using JavaScript is “the rollover” or "rollover image".  This feature allows the visitor to your web site to view different images depending on whether or not their mouse is rolled over a particular image or text in your web site.  An example of rollover code follows:

Notice that when you rollover the image, the image changes. Below is some sample code that accomplish this type of web enhancement.

<HTML>
<HEAD>
<TITLE>Link Rollover</TITLE>
<script language="JavaScript">
<!--Hide script from old browsers
if (document.images) {
    final = new Image
    finhov = new Image
            final.src = "hover_down.gif"
            finhov.src = "hover_up.gif"
}
else  {
            final = ""
            finhov = ""
            document.fin = ""
}
// End hiding script from old browsers -->
</SCRIPT>
</HEAD>
<BODY BBGCOLOR="CORNFLOWER">
<h1><A HREF="next.html" onMouseover="document.fin.src=final.src"
onMouseout="document.fin.src=finhov.src">
<IMG SRC="images/final-hover.gif" WIDTH="147" HEIGHT="82" NAME="fin" ALT="fin"></A>
</BODY>
</HTML>

Can you see how this works? There are several parts to this: The image sources (hover_down and hover_up) and the onMouseover command in the <h1> are the key elements. In order for this to work, you need to make certain that your filename.gif files are available in the same directory as your program file.

Another popular reason to use JavaScript is to develop a data entry form that verifies fields and redirects the user to a particular location on your data entry form if verification fails.  Here is an example of this code:

<html>
<font size="2" face="Arial" color="#FF0000">
<form name="TheForm">
<input type="text" name="nm"  size="33"> Your Name
<br><br>
<input type="text" name="em"  size="33"> E-mail address
<br>
<input type="text" name="emx" size="33"> Re-enter to confirm
<br><br>
<input type="button" value="Submit" name="SB" onClick="sendOff();">
<script language="JavaScript1.2">
var good;

function checkEmailAddress(field) {
// Note: The next expression must be all on one line...
//       allow no spaces, linefeeds, or carriage returns!
var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
if (goodEmail){
   good = true
} else {
   alert('Please enter a valid e-mail address.')
document.TheForm.focus() // put the cursor in the email field again
   field.focus()
   field.select()
   good = false
   }
}
function sendOff(){
   nmcheck = document.TheForm.nm.value   
   if (nmcheck.length <1) {
      alert('Please enter your name.')
      return
   }        
   good = false
   checkEmailAddress(document.TheForm.em)
   if ((document.TheForm.em.value ==
        document.TheForm.emx.value)&&(good)){
      alert("Name and email address fields verified good.")
   }    
   if ((document.TheForm.em.value !=
          document.TheForm.emx.value)&&(good)){
          alert('Both e-mail address entries must match.')
   }
}
</script>
</form>
</font>
</html>

Go ahead and copy the above code into a blank NOTEPAD document and save it as a filename.html file. Open it in your browser. What do you see? Do you see the forms fields? Go ahead and enter data and hit the submit button. What did you see? Were your name and email address verified? Try entering an email address that is not of standard format. What happens?

You may wonder how the above programs work.  Well, JavaScript works within an HTML program.  You simply insert JavaScript code within

<script type=”text/javascript: language=”JavaScript”>
ADD JAVASCRIPT STUFF HERE and when you are finished using JavaScript, simply insert
</script>

to end the JavaScript.

ASSIGNMENT:  Copy the above code for JavaScript and make a rollover image and form web page of your own. Either add it to your existing webpage or save it as an html file in your "W" drive here at Juniata College. Send an email to your instructor providing the URL.

III. From PowerPoint to the Web

Now that you’ve reviewed the basics of HTML and JavaScript, you are probably anxious to find a program that will develop a web page for you without all the fuss.  Let’s start with PowerPoint.  Turn those exciting slide shows into a web page by doing the following:

Using POWER POINT

Start powerpoint
Go to Start-->Programs-->Powerpoint
Power point operates like most of the Office Suite Which you are probably somewhat familiar. Power point is the presentation software—it will also make web pages, and we will do that by the end of the session today.
A quick generation of a business presentation
Go to file-->new-->from general templates
Click on presentations and select Business Plan
At this point you could simply go through the presentation and fill it our with the info you have already put together and produce a business plan, but we will add a few things to personalize and enhance the presentation.
Changing the Slide Design—Canned designs.
Go to format-->slide design
Really go ahead select one (Type ctrl+Z if you don’t like it)
Now you could just fill it in and be done with it, but we would like some on screen navigation controls
On Screen Navigation Controls
Go to Autoshapes (in the lower left) and action buttons
Choose the forward button
Drag the crosshairs to create a small button then this will pop-up
For now you can leave it on Next Slide, but you can play with the options.
To add a back button, go to autoshapes, select the back button and draw it the same size as the forward button. Leave it on previous slide
Now add the advance to end button (The right arrow with the line on it)
Now add the rewind to beginning button (The left arrow with the line on it)
Now make all the buttons the same size by
                     Right click on the button-->format autoshape->click on size

make both the height and width 0.5
Do this for all the buttons.
Align the buttons by
click and dragging the mouse over all the buttons
Click draw-->align or distribute-->align middle
Now to put them on every page:
Select the button if not already slected
Edit-->copy
press page down to move to the next slide
Edit-->Paste
Repeat until all slides are covered
Save your project
Hit [F5] to view the presentation
Now Publish to the web
Go tools-->options-->general and click on web options
Click O.K twice
File-->save as web page
Navigate to w:\www\  and name the file busplan
Now close PP and lets go to
http://students.juniata.edu/yourusername/busplan.htm
And voila you have business plan powerpoint and web page—quick and easy.

 

V. DREAMWEAVER Website development: A very brief intro
There are four main sections here:
Section 1. Getting Started with your first page/site
Section 2. Using an online source for fancy navigation buttons
Section 3. Adding images, text, and clickable regions
Section 4. Using frames

Section 1. Getting Started:

Part a. Some preliminaries:

I. Getting some info for use into the w:drive
1. Go to the W drive:
2. Go to the WWW directory
3. Right click and go to create new folder
4. Add a folder called  it110_web
5. GO to C:\Program Files\Macromedia\Dreamweaver MX\Samples
6. Copy the getting started folder
7. Go back to w:\www\it110_web
8. Paste the Copied folder into that directory

 

Part b. The Dreamweaver interface
  1. Click on Start-->programs-->macromedia--> dreamweaverMX

2. Now over on the right hand side there is a sites section—there will either be a tab or a list of sites, we will go to site-->newsite

3. Call it personal and click next

4. Leave it on "No I do not want to use a server technology" and click next

5. Fill in the dialog for W:\www\it110_web (you may also click the folder and navigate there.) Click next

6. Click on the folder to get:

8. Click on the folder with the red shplat in the right corner and call it personal then click open then click select.

9. Your dialog should not look like the above. Click NEXT.

10. Leave the site definition on "no do not check in and check out" Click Next.

11. Your dialog should not look like the above.  Click DONE.

Part c. Creating a first page

  1. Go to file-->New document

  1. First SINGLE CLICK around to the various possibilities to see what your options are, but DO NOT select any yet.
  2. Go to basic page-->click on a color scheme you like  and click on CREATE

  1. Your page should now look like this, if it doesn’t, go to view-->design

  1. File-->save--> call the file index
  2. File-->save as –call the file me
    Do this again for files called schedule, hobbies, MomDad

  3. Now to create a basic table based design—not fancy, but functional and quick. Click on insert-->table

  1. Change the rows to 5 and the columns to 5 and click OK.

This will now be your page

  1. Now we will merge the lower right cells by selecting them with the LEFT mouse button and dragging.

  1. Go to Modify--> Tables--> merge cells

  1. Now we will fill in the top and left side areas to create “navigation bars”

to Center the text select the text the text-->align-->center

  1. Now we will add links to all the other pages by selecting the text and then RIGHT CLICK and Make Link.

 

for home select index, for me select me, etc. until both the top and the side are filled in.

  1. Now to copy this to all the other pages  RIGHT CLICK on the table-->table-->select table.
  2. Edit copy

  1. Now to preview in the browser file—preview in browser. Click the files—note it is hard to tell where you are.
  2. So we will put in some simple effects.  Start in index and select home. Now in the text tool are below the design click the right justify button and save. Repeat this for the other layers.

Section 2: Using an Online Site to Create nifty navigation buttons.  You could create your own, but this is an easy way to get started.

2. Click on the buttons link
3. go toward the bottom of the page
4. Click on a button you like
5.
6.
.
7. Click the make mouseover button at the bottom of the page
8. When the new page says your button is ready click on the your button link
9. Go to dreamweaver
10. Open your index.htm file
11. Click in the home cell
12.  Go to insert-->interactive images
13. Fill out the dialog as follows
where the Original and Rollover images are in the directories you chose (you may use the browse).
14. Click O.K. and remove the text link for home if you want.

 

Section 3.  Adding images and text to your web pages
    1. Open Dreamweaver
    2. Open a Browser
    3. go to www.juniata.edu
    4. right click on the founder’s images and save to your web personal directory (or wherever your base web directory is for this sample project.
    5. Go back to dreamweaver
    6. go to INSERT-->IMAGE
    7. Navigate to w:\\www\it110_web\personal  (or wherever you save your web images) and add act.jpg
    8.  



9. Now lets put that in the upper left corner by

 

10. Clicking the right arrow on the keyboard to activate the cell




11.Now let’s add some text to the cell—type in whatever you like, but enough so it begins to wrap.

12.Now click back on the image to make it active



13. Now time to add some hotspots to the image—hotspots are places you can click on the image to create links to other pages.

14. Click on the image

15. Now save and preview in the browser. 

16. Play with the various settings until you get something you like

17. Finally, we will add a header to the page by:

  • Going to flamingtext.com again
  • Click on headings
  • Pick a style you like
  • Type in the banner heading
  • Click create logo
  • Wait till it appears
  • Right click and download to your personal folder
  • Type ctrl+home
  • Hit the enter key
  • INSERT-->Image
  • Preview page

Section 4: Using Frames.

Using frames and the built-in navigation bars

I.                    Intro:

Now we are going to use the built in navigation bars within the contexts of frames.  Frames actually paste multiple web pages together in a single computer window rather than adding a whole new web page in a whole new window.  The process consists of:

 

1.      starting up a frame set
2.      Adding a navigation bar
3.      Adding the target pages to the frame

II.                 Starting a frameset

1.      Start dreamweaver
2.      files-->new and click on framsets we will click around here a bit and choose a frameset—watch the screen up front to see which one we use

I am going to choose fixed top, but you could have chosen any other.

3.     
Now lets go to view—design so we can see what it looks like

Note that the upper and lower frames only have grayed out lines—lets add borders

4.      Adding borders:

i.      Click in the top frame then click on the properties tab about 2/3 of the way down on the left side of the DreamWeaver window

Now change the borders to yes the width to 10 and the color to whatever you want.
5.      Now to add the navigation bar—similar to the other way, but now we will use the correct tool to do it.

i.      Insert-->interactive image-->Navigation Bar


  ii.      We will add the home page, home page button by:
1.      Changing the element name
2.      Browsing to the up image
3.      Browsing to the down image
4.      Browsing to the when clicked, go to URL browse to the home page
5.      Now we will repeat for all our pages
  iii.      Preview in the Browser. 
iv.      Click on the nav bar items—did it take you to the correct places?
6.      Now we could go through and edit our pages to get rid of the other navigation aids. You should notice at this point that the this type of setup and navigation has some advantages over the table based approach.  Fewer navigation items smaller space requirement, etc..  One of the nicest features however is that if you add a links page, then you will have those link pages come up in the frame and your navigation will still be there. 

So enough of fun and games with Dreamweaver.