Summer 2000

By Carman Neustaedter

Advanced Web Page Design:

Day 1 – Introduction

Discussion will be made about good design techniques to enhance the user’s ease-of-navigation. Review of basic web page design will take place.

Topics Covered:

Demonstrations:

Check out these web sites for learning about web pages:

www.cutehtml.com (Cute HTML Editor)

tucows.oanet.com/htmlbeginner95.html (Beginner HTML Editors)

tucows.oanet.com/htmledit95.html (Advanced HTML Editors)

http://msdn.microsoft.com/workshop/author/html/beghtml.asp? (MSDN HTML Tutorial)

http://www.ucalgary.ca/it/itf/general/web/web-01.html (U of C Information Technology)

Check out these web sites for background images:

http://www.grsites.com/textures/

http://www.pixelfoundry.com/bgs.html

Winsock FTP or another transfer program

Upload personal web page files to an ACS account and a create public_html directory with proper permissions for viewing.

 

Assignments:

Business Web Page

Begin the design of a corporate web page. Include information about the service you are offering and pricing for various services. Upload your work to a web server such as the U of C server. Some example businesses may be building computers, designing web pages, offering video game cheats and walkthroughs, online pizza or restaurant ordering.

Review Notes:

World Wide Web Organization

The Internet

The Internet is a computer network made up of thousands of networks world-wide. No one knows exactly how many computers are connected to the Internet. It is certain, however, that these numbers are in the millions and more are added every day.


No one is in charge of the Internet. There are organizations that work on technical aspects of the network, but no one group is in control. Internet traffic flows through routers that send data to different computers connected to the Internet.

TCP/IP is the protocol that is used for the Internet. A protocol is just a standard by which something is done. TCP/IP works by sending data in packets to computers connected to the Internet. If you are downloading a file or loading a web page, the files needed are split up into chunks and sent to you chunk by chunk.

 

Servers & Domains

ie.www.ucalgary.ca is the URL where the University of Calgary’s web page is

ucalgary.ca is the domain name, and therefore we are looking for the web page on the server computer pointed to by ucalgary.ca

 

 

HTML Files

ie.

myWordFile.doc (doc means it is a Word document)

myExcelFile.xls (xls means it is an Excel spreadsheet)

myWebPage.html (html means it is a web page viewable in Netscape or Internet Explorer)

myWebPage.htm (means the same thing as html)

 

 

 

 

Directories

ie.

www.cpsc.ucalgary.ca/~carman/

this URL says that my web page is on the CPSC server in a directory called carman.

 

HTML

ie. <BOLD> This text will be bold. </BOLD>

 

Where Do I Create a Web Page?

 

Important Tags

 

You can see that the above tags usually have a start tag and a finish tag. Everything between start and finish is formatted according to the tag. You can have tags nested inside of each other as well.

ie. <BOLD><CENTER>This text will be bold and centred</BOLD></CENTER>

<UL>

<LI>Item 1

<LI>Item 2

</UL>

the <UL> tag starts the bulleted list, each <LI> tag specifies where a bullet will appear. The </UL> tag tells where the bulleted list ends.

 

 

Linking Pages

 

 

Putting Your Page on the Internet

UNIX commands

UNIX Command

DOS Command

ls

(displays files)

dir

ls -al

(displays all files in a list)

 

rm <filename>

(removes a file)

del <filename>

rm -r <directory name>

(removes a directory and all its contents)

deltree <directory name>

cd <directory name>

(changes directories)

cd <directory name>

cd ..

(note there must be a space after cd before the two periods)

(moves back one directory)

cd..

(don’t need space after cd)

mkdir <directory name>

(make directory)

mkdir <directory name>

cp <filename> <location>

(copies file)

copy <filename> <location>

mv <filename> <location>

(moves a file or renames it)

move <filename> <location>

rename <filename> <new name>

man <UNIX command>

(displays list of how to use a UNIX command)

 

man -k <word>

(searches manual pages for pages containing your word)

 

pine

(open up email program)

 

chmod <permissions> <filename>

(changes permissions on a file)

attrib <permissions> <filename>

 

Creating a Directory for Your Web Page

 

To log in to your ACS account, go to Start -> Run, then type in telnet acs5.acs.ucalgary.ca

This will log you into one of ACS's computers. You must enter in your USERNAME and PASSWORD. When asked for terminal type, choose 1 for VT100.

You will get a command prompt where you can enter the following command.

 

acs6:/u201/cgneusta--> mkdir public_html

 

Sending Your Files to Your Web Site

 

 

 

Changing Permissions (giving the world access)

acs6:/u201/cgneusta--> cd ..

acs6:/u201/--> chmod 755 cgneusta (where cgneusta is your username for your ACS account)

acs6:/u201/--> cd cgneusta

acs6:/u201/cgneusta--> chmod -R 755 public_html

 

Viewing Your Web Page on the Internet

your web page can now be viewed at:

www.ucalgary.ca/~cgneusta

where cgneusta is your login name for your ACS university account

 

 

Supplementary Notes:

 

CHMOD - Setting Permissions in UNIX

The command CHMOD is used to change the viewing permissions of files in your ACS account. For your web page you want the world to be able to view your web page files.

Each file has permissions, depending on the type of user.

There are three user types:

Each user has permissions for:


So, for you, group, and others there are rwx permissions ([r]ead, [w]rite, e[x]ecute).

They are grouped like this

you
rwx

group
rwx

others
rwx

If the user is to have a permission to either read, write, or execute, that letter is assigned a 1. If not, it is assigned a 0.

eg. this assignment gives you permission to read, write, and execute your file. Nobody else is allowed to read, write, or execute your file.

you
111

group
000

others
000

eg. this assignment gives you permission to read, write, and execute your file. It also allows the rest of the world to view your file or run it, but not write it (make changes to it).

you
111

group
101

others
101

the chmod command can use a number to set the permissions of a file:

eg.

chmod 755 public_html

The number just represents what permissions you are giving the file.

The number is a base 8 number (octal) representing the users: you, group, others

If you create a number for each of: you, group, others
you can put the numbers next to each other to form the number for the chmod command.

First you must create an octal number for each user.

Take the combination of 1's and 0's from above to form an octal number using this conversion table:

Binary Number

Octal Number

000

0

001

1

010

2

011

3

100

4

101

5

110

6

111

7

Then combine each user's octal number to create a 3 digit number. This is the number used for the chmod command.

eg.

If I want the world to be able to view a file then I want to give read and execute permissions to the users group and others. I want to keep my permissions at read, write, and execute still though.

I would use this series of 1's and 0's:

you
111

group
101

others
101

by using the conversion table above I would get:

you
7

group
5

others
5

this would give me the number: 755

and I would use the command: chmod 755 <filename>

 

 

 

 

 

 

 

All the HTML Tags You Could Want

http://hotwired.lycos.com/webmonkey/reference/html_cheatsheet/

 

Hit Counter

<img src="http://www.ucalgary.ca/cgi-bin/Count.cgi?dd=B&amp;df=NAME-OF-YOUR-PAGE">

 

Guestbook HTML Source Code (by Adam King)

<HTML>

<HEAD>

<TITLE>My Guestbook</TITLE>

</HEAD>

<BODY BGCOLOR="CCCCCC">

<H1> Sign In, Please...</H1>

<FORM METHOD="POST" ACTION="mailto:carman@cpsc.ucalgary.ca"

ENCTYPE="text/plain">

<B>Please enter your name: </B><INPUT NAME="username" size="30">

<BR>

<B>and your email address: </B><INPUT Name="usermail" size="30">

<P>

<CENTER>

<B>What do you think of my site?</B>

<P>

<INPUT TYPE="radio" NAME=I_think_that VALUE="It's_Great">It's Great!

<INPUT TYPE="radio" NAME=I_think_that VALUE="It's_Okay">It's Okay!

<INPUT TYPE="radio" NAME=I_think_that VALUE="It_Needs_Work">It Needs Work!

<BR>

<P>

</CENTER>

<H3>Make any comments you'd like below:</H3>

<CENTER>

<TEXTAREA NAME="comment" ROWS=6 COLS=60></TEXTAREA>

<P>

<B>Thanks for your input</B>

<BR>

<INPUT TYPE=submit VALUE="Send it!">

<INPUT TYPE=reset VALUE="Start over">

</CENTER>

</FORM>

<A HREF="index.html">Back to Main Page</A>

</BODY>

</HTML>

Midi Sound

<bgsound src="mymusic.mid" loop=1>

<embed src ="mymusic.mid" hidden=false autostart=true height=60 width=144 volume=50% loop="no">

Scrolling Text for IE (Java Script)

<SCRIPT language="JavaScript">

<!-- begin

function scrollit(seed)

{

var msg = "Add Your Scrolling Text Here"

var out = " ";

var c = 1;

if(seed > 0)

{

for(c=0 ; c < seed ; c++)

{

out += " ";

}

out += msg;

seed--;

var cmd = "scrollit(" + seed + ")";

window.status = out;

timerTwo = window.setTimeout(cmd,80);

}

else

{

if(-seed < msg.length)

{

out += msg.substring(-seed, msg.length);

seed--;

var cmd = "scrollit(" + seed + ")";

window.status = out;

timerTwo=window.setTimeout(cmd,80);

}

else

{

window.status = " ";

timerTwo = window.setTimeout("scrollit(120)",80);

}

}

}

scrollit(150);

// end -->

</SCRIPT>

 

 

 

 

 

 

Day 2 – Frames

The goal is to develop and introduce more advanced techniques used for designing web pages such as using frames for navigational ease.

Topics Covered:

Demonstrations:

Frame Code

<frameset></frameset>

tag in a frames document; can also be nested in other framesets

<frameset rows="value,value">

defines the rows within a frameset, using number in pixels, or percentage of width

<frameset cols="value,value">

defines the columns within a frameset, using number in pixels, or percentage of width

<noframes></noframes>

defines what will appear on browsers that don't support frames

<frame name="name">

specifies which HTML document should be displayed

<frame marginwidth=#>

defines the left and right margins for the frame; must be equal to or greater than 1

<frame marginheight=#>

defines the top and bottom margins for the frame; must be equal to or greater than 1

<frame scrolling=VALUE>

sets whether the frame has a scrollbar; value may equal "yes," "no," or "auto. " The default, as in ordinary documents, is auto.

<frame noresize>

prevents the user from resizing a frame

 

Example of index page for frames: (each frame must be an html file)

<HTML>

<HEAD>

<TITLE>My Frame Page</TITLE>

</HEAD>

<frameset cols="190,*" frameborder="0" border="0">

<frame src=menu.html name="menu" noresize>

<frame src=display.html name="display" noresize>

</frameset>

<noframes>

<center><h1>

Sorry, your browser does not support frames. This website was designed specifically for frames. Download a newer version of Netscape Communicator or Internet Explorer.

</center></h1>

</noframes>

</HTML>

Example of Loading a Page in a Frame:

<a href="newPage.html" target="display">

 

Assignments:

Frames

Add at least two frames to your corporate/business web page. One frame should be used as a menu for navigation through the web site. Use the second frame to display the requested page.

Day 3 – Online Forms

The goal is to develop and introduce advanced web design features such as special plug-ins and HTML code to enhance a page.

Topics Covered:

Demonstrations:

Frame Code

<form></form>

Creates all forms

<select multiple name="NAME" size=?></select>

Creates a scrolling menu. Size sets the number of menu items visible before yo u need to scroll.

<option>

Sets off each menu item

<select name="NAME"></select>

Creates a pulldown menu

<textarea name="NAME" cols=40 rows=8></textarea>

Creates a text box area. Columns set the width; rows set the height.

<input type="checkbox" name="NAME">

Creates a checkbox. Text follows tag

<input type="radio" name="NAME" value="x">

Creates a radio button. Text follows tag

<input type=text name="foo" size=20>

Creates a one-line text area. Size sets length, in characters

<input type="submit" value="NAME">

Creates a Submit button

<input type="image" border=0 name="NAME" src="name.gif">

Creates a Submit button using an image

<input type="reset">

Creates a Reset button

 

 

Example:

<html>

<title>The Computer Test</title>

<body>

<h1><center>Welcome to the Computer Test</center></h1>

<br><br>

<form method="post" action="mailto:carman@cpsc.ucalgary.ca" enctype="text/plain">

<!-- Begin Form (these are just comments, they won't show up on the page) >

<hr>

Please type in your name: <input name="Name" size="30">

<br>

Please type in your email address: <input name="Email" size="30">

<br>

<br>

<br>

Do you own a home computer?

<input type="radio" name="Do you own a home computer?" value="Yes">Yes

<input type="radio" name="Do you own a home computer?" value="No">No

<br>

Do you have Internet access?

<input type="radio" name="Do you have Internet access?" value="Yes">Yes

<input type="radio" name="Do you have Internet access?" value="No">No

<br>

<br>

What do you use a computer normally for (select all that apply)?

<br>

<input type="checkbox" name="Use of computer?" value="Games">Playing Games

<br>

<input type="checkbox" name="Use of computer?" value="Internet Surfing">Internet Surfing

<br>

<input type="checkbox" name="Use of computer?" value="Homework">Homework

<br>

<input type="checkbox" name="Use of computer?" value="Listening to Music">Listening to Music

<br>

<br><br>

The computer I normally work on is a (select one):

<br>

<select multiple name="Computer type" size=4>

<option>Pentium

<option>Pentium II

<option>Celeron

<option>Pentium III

<option>AMD K6

<option>AMD Athlon

<option>Cyrix

</select>

<br><br><br>

Describe your favourite computer pastime:

<br>

<textarea name="Favourite Pastimes" rows=10 cols=60></textarea>

 

<br><br>

<center>

<input type=submit value="Finished">

<input type=reset value="Clear">

</center>

<!-- End Form >

</form>

</body>

</html>

Assignments:

Online Ordering

Add a page to your business web site that contains an online ordering feature or a survey/questionnaire of some sort. Use

 

Day 4 – Mouse Events, Adding Simple Java Scripts

The goal is to learn about advanced web design techniques to emphasize the user’s actions.

Topics Covered:

Demonstrations:

Java Script Code Samples

http://www.planetsourcecode.com/vb/default.asp?lngWId=2

Mouse Over Events (handling them)

<center>

<a href="#" onMouseOver="imageSwap('myImg', 'blue_hi.gif');"

onMouseOut="imageSwap('myImg', 'red_hi.gif');">

<img name="myImg" src="red_hi.gif" border=0>

</a>

</center>

 

JavaScript to Change an Image

(can be called on mouse over)

<script language="JavaScript">

<!--

function imageSwap(lastImage, newSrc){

var objStr,obj;

// based on code from Web Monkey www.webmonkey.com

if(document.images){

if (typeof(lastImage) == 'string') {

objStr = 'document.' + lastImage;

obj = eval(objStr);

obj.src = newSrc;

} else if ((typeof(lastImage) == 'object') && lastImage &&

lastImage.src) {

lastImage.src = newSrc;

}

}

}

// -->

</script>

 

 

Assignments:

Mouse Over Events and Java Scripts

Update your corporate web page to include mouse over events and other Java Scripts.

Day 5 – Project

The goal is to use all the tools from the previous classes to complete a business web page.

Topics Covered:

Assignments:

Business/Corporate Web Page

Complete your personal web pages using all the tools you have learned during the course.