[go: up one dir, main page]

0% found this document useful (0 votes)
534 views40 pages

What Is Internet

Uploaded by

ADSR
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
534 views40 pages

What Is Internet

Uploaded by

ADSR
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 40

COMP03 - Introduction to World Wide Web

The Easiest way to learn about the Internet and the Web

COMP03 Course Module: Prelim Period

OVERVIEW OF THE INTERNET

WHAT IS INTERNET?

INTERNET
- it is a collection of local, regional, national and international computer networks that are linked together to exchange data
and to distribute processing task.
- it is the world’s largest computer network, the network of networks, scattered all over the world.
- Created 25 years ago as a project for the US Department of Defense.
- Its Goal: To create a method for widely separated computers to transfer data efficiently even if the event of the
nuclear attack.
- it is a group of two or more network that are:
- Interconnected physically
- Capable of communicating and sharing data with each other
- Able to act together as a single network
 To be used by different type of machines and be understood by all of them, the software must follow a set of rules or
protocol, which either uses the TCP/IP protocol or interacts with TCP/IP networks via gateways (the interpreter).
The Internet presents these networks as one, seamless network for its users.
 Internet covers the globe and includes large international networks as well as many smaller, Local Area Networks
(LANs).
 Internet offers access to data, graphics, sounds, software, text and people through a variety of services and tools for
communicating and data exchange:
1. Remote Login (Telnet)
2. File Transfer (FTP)
3. Electronic Mail (E-Mail)
4. News (News or Network news)
5. HyperText (WWW)

WHAT’S SPECIAL ABOUT INTERNET?

It’s the cheapest and fastest means to:


1. Get Information (people, products, organization, research, etc.)
2. Private Information (advertizing, publishing, extensions, teachings)
3. Compile Information (surveys, get opinions, discussions)

GLOBAL INTERNET CONNECTIVITY

INTERNET ACCESS:

2 Basic Ways:
1. ISP (Internet Service Provider)
2. Dial-Up Connections

*COMPONENTS OF A DIAL-UP CONNECTIONS*

DIAL-UP CONNECTION

Prepared By: John Romeo V. Etis 


1
COMP03 - Introduction to World Wide Web
The Easiest way to learn about the Internet and the Web

1. An account with an Internet Access Provider such as India, VSNL, Saytam Online. The account can be either
TCP/IP or Shell.
2. A telephone connection.
3. A computer with a serial port (for external modems) or an expansion slot (for internal modems).
4. A Modem (internal/external)
5. A Communication (or terminal emulation) software
 SLIP/PPP (TCP/IP) Account holders requires:
o Browser Software
 Internet Explorer  Google Chrome
 Netscape Navigator  Mozilla Firefox
 Shell account holders requires:
o Lynx (browser software)
o Pine (E-mail Software)

DIRECT CONNECTION:

 You can also get a direct connection to your ISP, where you have a forced cable or a dedicated phone line to the ISP.
 Often the dedicated line is an ISDN (Integrated Services Digital Network) line which is a higher-speed version of
the standard phone line, but actually requires two phone lines.
 ISDN can handle more than 56,000 bps.

LISTS OF ACTIVITIES THAT YOU CAN DO WITH A WEB BROWSER:

 Visit websites  Join contests


 Send and receive E-mails  Contribute articles and other materials
 Read/post articles in newsgroup  Do online shopping
 Download files to your PC  Post you resumes on the internet
 Chat with other users on-line  Find person’s detail
 Play games with other on-line  Send flowers or gifts to others.
 Create an e-mail ID and account  Access on-line multimedia including radio
 Use the e-mail remainder services and video broadcasts
 Search information
 Subscribe to electronic newsletters, etc.

INTERNET PROTOCOLS

Transmission Control Protocol/Internet Protocol (TCP/IP) - it is actually a collection of protocols, or rules that
govern the way data travels from one machine to another across networks.

File Transfer Protocol (FTP) - it is the protocol or set of rules which enables files to be transferred between
computers. It is a network protocol used to transfer data from one computer to another through a network such as the
Internet. FTP sites are typically used for uploading and downloading files to a central server computer, for the sake
of file distribution.
 Works on the client/server principle.
 A Client Program enables the user to interact with a Server in order to access information and services on
the server computer.
 FTP Server - this is where the files that can be transferred are being stored.

Three (3) Basic Steps to use FTP are:


1. Connect to the FTP server.
2. Navigate the file structure to find the file you want.
3. Transfer the file.
 Files on FTP Servers are often compressed. Compression decrease files size. This enables more files to
be stored and makes file transfer times shorter.
 Needs to have current virus checking software on the computer before files are transferred to it.

Prepared By: John Romeo V. Etis 


2
COMP03 - Introduction to World Wide Web
The Easiest way to learn about the Internet and the Web

HyperText Transfer Protocol (HTTP) - it is the set of rules, or protocol that governs the transfer of hypertext
between two or more computers. It is an application-level protocol with the lightness and speed necessary for
distributed, collaborative, hypermedia information systems.
 Hypertext is text that is specially coded using a standard system called HTML (Hypertext Mark-Up
Language).
 It is based on a client/server principle:

TELNET - it is a protocol, or a set of rules that enables one computer to connect to another computer. This process
is referred to as remote login.
 Local Computer - it is the user’s computer which initiates the connection.
 Remote/Host Computer - it is the machine being connected to which the connection.

GOPHER - it is a protocol designed to search, retrieve and display documents from remote sites on the Internet. It’s
goal is to function as an improved form of Anonymous FTP, enhanced with hyperlinking features similar to that of
the World Wide Web. The Gopher protocol offers some features not natively supported by the Web and imposes a
much stronger hierarchy on information stored on it.
 Information accessible via Gopher is stored on many computer all aver the Internet. This computers are
called Gopher servers.

Wide Area Information Server (WAIS) - it is an Internet search tool that is based on the Z39.50
standard → describes a protocol, or a set of rules, for computer-to-computer information retrieval. It was developed
in the late 1980s as a project of Thinking Machines, Apple Computer, Dow Jones, and KPMG Peat Marwick.

IP Address (Internet Protocol) - it is an identifier for a particular machine on a particular network.


 IP numbers; Internet Addressed
 Consists of 4 section: Ex. 202.54.16
 Characteristics of IP Addresses:
1. IP addresses are unique.
2. No two machines can have the same IP number.
3. IP addresses are also global and standardized.
4. All machines connected to the same scheme for establishing an address.

Domain Name - it identifies and locates computers connected to the Internet; no two organizations can have the
same domain name.
 .com - commercial entities
 .edu - educational institutions
 .net - organizational directly involved in Internet operations.
 .org - miscellaneous organizations that don’t fit any other category such as non-profit groups.
 .gov - United States Federal/Government entities.
 .mil - US Military

Country Codes - a two-letter abbreviation for a particular country.


Ex. “in” – India, “ph” – Philippines, “uk” – United Kingdom, “ff” – France.

Electronic Mail (E-Mail) - it is any method of creating, transmitting, or storing primarily text-based human
communications with digital communications systems.

Prepared By: John Romeo V. Etis 


3
COMP03 - Introduction to World Wide Web
The Easiest way to learn about the Internet and the Web

Electronic Mail Address


- Email allows information to be sent between computers and people on the Internet.
 username@host.subdomain.second-leveldomain.first-level-domain
o Ex. aleon@giasmd01.vsnl.net.in

Uniform Resource Locator (URL) - it is the unique address for a file that is accessible on the Internet. It identifies a
particular Internet resource; for example a webpage, a gopher server, a library catalog, an image or a text file.
 Every resource available via WWW has a unique URL.
 Structure of a URL:
o Ex. http://www.InL.net/alexis/imdex.html

Web Browsers - it is a software that allows user to view certain types of Internet files in an interactive environment.
It is a software application which enables a user to display and interact with text, images, videos, music, games and
other information typically located on a Web page at a Web site on the World Wide Web or a local area network.
 Example:
o MS Internet Explorer o Hot java
o NetScape Navigator o Lynx
o Mosaic o Mozilla Firefox
o Opera o Google Chrome
o Amaya o Konqueror
o Avant Browser

Internet Relay Chat (IRC) - it is a multi-user chat system that allows many people to communicate simultaneously
across the Internet, in real time. It is a form of real-time Internet chat or synchronous conferencing. It is main designed
for group communication in discussion forums called channels, but also allows one-to-one communication via private
message, as well as chat and data transfers via Direct Client-to-Client. IRC is an open protocol that uses TCP and
optionally TLS.
 It was developed by Jarkko Oikarinen (Finland) in 1988.
 The chats takes palce on channels, which are the virtual locations on IRC networks where users meet to
talk to one another.
 Some of the most frequently used commands:
o /help - to get the list of all commands
o /list - to view all available channels
o /join channels - to join a channel
o /quit - to quit from IRC server
o /leave channel - to leave a channel

THE HISTORICAL FIELDS

BRIEF HISTORY OF THE INTERNET

The ARPANET

The US Defense Department created a project called ARPA or Advanced Research Project Agency in late
1960, which was to work as a network that would allow scientist and military personnel to exchange information
in a war without disruption in communication. The network was connected in a way that ensured if one section
of the network was damaged, the remaining computers on the network would still be able to communicate with
each other and this network was called ARPANET. By 1984, ARPANET had more than 1,000 computers linked
as host.

The NSFNET

In 1986, National Science Foundation (NSF) connected its huge network of five supercomputer centers, called
NSFNet, to ARPANET. NSFNet used the technology developed for ARPANET to allow universities and
schools to connect to each other. By 1987, NSFNet could no longer handle the amount of information that was
being transferred. The National Service Foundation improved the network to allow more information to transfer.
This configuration of complex networks came to be known as the Internet.

Prepared By: John Romeo V. Etis 


4
COMP03 - Introduction to World Wide Web
The Easiest way to learn about the Internet and the Web

Most of the people accessing the Internet were scientist and researchers till the late 1980s. In the early 1990s,
many companies started to offer access to home users. This allowed anyone with a modem and a computer to
access the Internet.

The World Wide Web

The World Wide Web (WWW) was created in the early 1990s by European Laboratory for Particle Physics. Its
goal was to allow researchers to work together on projects and make project information easily accessible. The
first publicity accessible Website was created in 1991. By the mid 1990s, over 30 million people had access to
the Internet. To reach this huge market, most big companies created their own sites on the World Wide Web to
sell or provide information about their products. There are now thousands of companies on the web.

INTERNET TIMELINE

1957 USSR launches Sputnik, first artificial earth satellite. In response, US forms the Advanced Research Projects
Agency (ARPA), the following year, within the Department of Defense (DoD) to establish US lead in science
and technology applicable to the military (:amk:)

1961 Leonard Kleinrock, MIT: "Information Flow in Large Communication Nets" (May 31) First paper on packet-
switching (PS) theory

1962 J.C.R. Licklider & W. Clark, MIT: "On-Line Man Computer Communication" (August). Galactic Network
concept encompassing distributed social interactions

1964 Paul Baran, RAND: "On Distributed Communications Networks" Packet-switching networks; no single outage
point

1965 ARPA sponsors study on "cooperative network of time-sharing computers"


TX-2 at MIT Lincoln Lab and AN/FSQ-32 at System Development Corporation (Santa Monica, CA) are
directly linked (without packet switches) via a dedicated 1200bps phone line; Digital Equipment Corporation
(DEC) computer at ARPA later added to form "The Experimental Network"

1966 Lawrence G. Roberts, MIT: "Towards a Cooperative Network of Time-Shared Computers" (October) First
ARPANET plan

1967 ARPANET design discussions held by Larry Roberts at ARPA IPTO PI meeting in Ann Arbor, Michigan
(April) ACM Symposium on Operating Systems Principles in Gatlinburg, Tennessee (October). First design
paper on ARPANET published by Larry Roberts: "Multiple Computer Networks and Intercomputer
Communication First meeting of the three independent packet network teams (RAND, NPL, ARPA). National
Physical Laboratory (NPL) in Middlesex, England develops NPL Data Network under Donald Watts Davies
who coins the term packet. The NPL network, an experiment in packet-switching, used 768kbps lines

1968 PS-network presented to the Advanced Research Projects Agency (ARPA)


Request for quotation for ARPANET (29 Jul) sent out in August; responses received in September. University
of California Los Angeles (UCLA) awarded Network Measurement Center contract in October Bolt Beranek
and Newman, Inc. (BBN) awarded Packet Switch contract to build Interface Message Processors (IMPs) US
Senator Edward Kennedy sends a congratulatory telegram to BBN for its million-dollar ARPA contract to
build the "Interfaith" Message Processor, and thanking them for their ecumenical efforts. Network Working
Group (NWG), headed by Steve Crocker, loosely organized to develop host level protocols for communication
over the ARPANET. (:vgc:)
Tymnet built as part of Tymshare service (:vgc:)

1969 ARPA (Advanced Research Projects Agency) goes online in December, connecting four major U.S.
universities. Designed for research, education, and government organizations, it provides a communications
network linking the country in the event that a military attack destroys conventional communications systems.

Prepared By: John Romeo V. Etis 


5
COMP03 - Introduction to World Wide Web
The Easiest way to learn about the Internet and the Web

1972 Electronic mail is introduced by Ray Tomlinson, a Cambridge, Mass., computer scientist. He uses the @ to
distinguish between the sender's name and network name in the email address.

1973 Transmission Control Protocol/Internet Protocol (TCP/IP) is designed and in 1983 it becomes the standard for
communicating between computers over the Internet. One of these protocols, FTP (File Transfer Protocol),
allows users to log onto a remote computer, list the files on that computer, and download files from that
computer.

1976 Presidential candidate Jimmy Carter and running mate Walter Mondale use email to plan campaign events.
Queen Elizabeth sends her first email. She's the first state leader to do so.

1982 The word “Internet” is used for the first time.

1984 Domain Name System (DNS) is established, with network addresses identified by extensions such as .com,
.org, and .edu. Writer William Gibson coins the term “cyberspace.”

1985 Quantum Computer Services, which later changes its name to America Online, debuts. It offers email,
electronic bulletin boards, news, and other information.

1988 A virus called the Internet Worm temporarily shuts down about 10% of the world's Internet servers.
1989 The World (world.std.com) debuts as the first provider of dial-up Internet access for consumers.Tim Berners-
Lee of CERN (European Laboratory for Particle Physics) develops a new technique for distributing
information on the Internet. He calls it the World Wide Web. The Web is based on hypertext, which permits
the user to connect from one document to another at different sites on the Internet via hyperlinks (specially
programmed words, phrases, buttons, or graphics). Unlike other Internet protocols, such as FTP and email, the
Web is accessible through a graphical user interface.

1990 The first effort to index the Internet is created by Peter Deutsch at McGill University in Montreal, who devises
Archie, an archive of FTP sites.

1991 Gopher, which provides point-and-click navigation, is created at the University of Minnesota and named after
the school mascot. Gopher becomes the most popular interface for several years. Another indexing system,
WAIS (Wide Area Information Server), is developed by Brewster Kahle of Thinking Machines Corp.

1993 Mosaic is developed by Marc Andreeson at the National Center for Supercomputing Applications (NCSA). It
becomes the dominant navigating system for the World Wide Web, which at this time accounts for merely 1%
of all Internet traffic.

1994 The White House launches its website, www.whitehouse.gov.


Initial commerce sites are established and mass marketing campaigns are launched via email, introducing the
term “spamming” to the Internet vocabulary. Marc Andreessen and Jim Clark start Netscape Communications.
They introduce the Navigator browser.

1995 CompuServe, America Online, and Prodigy start providing dial-up Internet access.
Sun Microsystems releases the Internet programming language called Java.
The Vatican launches its own website, www.vatican.va.

1996 Approximately 45 million people are using the Internet, with roughly 30 million of those in North America
(United States and Canada), 9 million in Europe, and 6 million in Asia/Pacific (Australia, Japan, etc.). 43.2
million (44%) U.S. households own a personal computer, and 14 million of them are online.

1997 On July 8, 1997, Internet traffic records are broken as the NASA website broadcasts images taken by
Pathfinder on Mars. The broadcast generates 46 million hits in one day.
The term “weblog” is coined. It’s later shortened to “blog.”

1998 Google opens its first office, in California.

Prepared By: John Romeo V. Etis 


6
COMP03 - Introduction to World Wide Web
The Easiest way to learn about the Internet and the Web

1999 College student Shawn Fanning invents Napster, a computer application that allows users to swap music over
the Internet. The number of Internet users worldwide reaches 150 million by the beginning of 1999. More than
50% are from the United States. “E-commerce” becomes the new buzzword as Internet shopping rapidly
spreads. MySpace.com is launched.

2000 To the chagrin of the Internet population, deviant computer programmers begin designing and circulating
viruses with greater frequency. “Love Bug” and “Stages” are two examples of self-replicating viruses that send
themselves to people listed in a computer user's email address book. The heavy volume of email messages
being sent and received forces many infected companies to temporarily shut down their clogged networks. The
Internet bubble bursts, as the fountain of investment capital dries up and the Nasdaq stock index plunges,
causing the initial public offering (IPO) window to slam shut and many dotcoms to close their doors. America
Online buys Time Warner for $16 billion. It’s the biggest merger of all time.

2001 Napster is dealt a potentially fatal blow when the 9th U.S. Circuit Court of Appeals in San Francisco rules that
the company is violating copyright laws and orders it to stop distributing copyrighted music. The file-swapping
company says it is developing a subscription-based service. About 9.8 billion electronic messages are sent
daily.
Wikipedia is created.

2002 As of January, 58.5% of the U.S. population (164.14 million people) uses the Internet. Worldwide there are
544.2 million users. The death knell tolls for Napster after a bankruptcy judge ruled in September that German
media giant Bertelsmann cannot buy the assets of troubled Napster Inc. The ruling prompts Konrad Hilbers,
Napster CEO, to resign and lay off his staff.

2003 It's estimated that Internet users illegally download about 2.6 billion music files each month. Spam,
unsolicited email, becomes a server-clogging menace. It accounts for about half of all emails. In December,
President Bush signs the Controlling the Assault of Non-Solicited Pornography and Marketing Act of 2003
(CAN-SPAM Act), which is intended to help individuals and businesses control the amount of unsolicited
email they receive.
Apple Computer introduces Apple iTunes Music Store, which allows people to download songs for 99 cents
each. Spam, unsolicited email, becomes a server-clogging menace. It accounts for about half of all emails.
Apple Computer introduces Apple iTunes Music Store, which allows people to download songs for 99 cents
each.

2004 Internet Worm, called MyDoom or Novarg, spreads through Internet servers. About 1 in 12 email messages
are infected. Online spending reaches a record high—$117 billion in 2004, a 26% increase over 2003.
2005 YouTube.com is launched.

2006 There are more than 92 million websites online.

2007 Legal online music downloads triple to 6.7 million downloads per week.
Colorado Rockies' computer system crashes when it receives 8.5 million hits within the first 90 minutes of
World Series ticket sales. The online game, World of Warcraft, hits a milestone when it surpasses 9 million
subscribers worldwide in July.

2008 In a move to challenge Google's dominance of search and advertising on the Internet, software giant Microsoft
offers to buy Yahoo for $44.6 billion. In a San Fransisco federal district court, Judge Jeffrey S. White orders
the disabling of Wikileaks.org, a Web site that discloses confidential information. The case was brought by
Julius Baer Bank and Trust, located in the Cayman Islands, after a disgruntled ex-employee allegedly provided
Wikileaks with stolen documents that implicate the bank in asset hiding, money laundering, and tax evasion.
Many web communities, who see the ruling as unconstitutional, publicized alternate addresses for the site and
distributed bank documents through their own networks. In response, Judge White issues another order to stop
the distribution of bank documents. Microsoft is fined $1.3 billion by the European Commission for further
abusing its dominant market position, and failing to comply to their 2004 judgment, which ordered Microsoft
to give competitors information necessary to operate with Windows. Since 2004, Microsoft has been fined a
total of $2.5 billion by the Commission for not adhering to their ruling.

RELATING ETHICS TO INTERNET

Prepared By: John Romeo V. Etis 


7
COMP03 - Introduction to World Wide Web
The Easiest way to learn about the Internet and the Web

Ethical and Societal Dimensions of E-Business.

The vital role of E-business and E-commerce systems in society raises serious ethical and societal issues in terms of their
impact on employment, individuality, working conditions, privacy, health, and computer crime. Managers, business
professionals, and IS specialists can help solve the problems of improper use of IT by assuming their ethical responsibilities
for the ergonomic design, beneficial use, and enlightened management of E-business technologies in our society. See Figure
9.2.

The Ethical Foundations of E-Business.

Business and IT activities involve many ethical considerations. Various ethical philosophies and models of ethical behavior
may be used by people in forming ethical judgments. These serve as a foundation for ethical principles that can serve as
guidelines for dealing with ethical business issues that may arise inE-businessand E-commerce.

E-Business Security Management.

One of the most important responsibilities of the management of a company is to assure the security and qualityof its E-
business activities. Security management tools and policies can ensure the accuracy, integrity, and safety of the E-business
systems and resources of a company, and thus minimize errors, fraud, and security losses in their E-commerce activities. See
Figure 9.15.

Internet Marketing Ethics Web Issues


 Ethical issues in eMarketing, B2B + ethics, marketing standards for advertising ethics B2C site compared to a
B2B site.
 Ethics and B2B, legal, & ethical issues. E-business Ethical Issues & Concerns.
o What are Internet ethics and B2B marketing and advertising ethics in B2B and B2C? B2B legal, ethics, regulatory
ethical and legal issues with websites B2C & B2B.

Importance Of Ethics On The Internet


by: James A. Warholic
B2C marketing ethical and legal issues on a B2B VS. B2C. B2B & B2C Web sites compare: www.pwebs.net. What is
ethical in B2C Web sites? Who can you trust? Understanding B2B B2C.
In a society where legal and ethical limits are pushed to the max and how the attitude pervades those around us that if there
are no rules against something then it is ok to do, why even ask about ethics and values on the Web? Because, it affects you
and your business!

Business Ethics

The Internet is a growing and a continually evolving creature that will live on in perpetuity. As such, it would be wise to
ponder the e business legal and Internet marketing ethical issues of b2b b2c. Whatever is written and published online will
be there forever. Imagine the billions upon billions of text information pages that are and will be stored for a long time.
There is even a site where you can go Way Back to check out archives of other websites and view pages that were created at
the beginning of their infancy. Additionally, video, films, movies, and audio in various applications formats are also
viewable.
Now, with the new wireless web mail from cell phones and other pda communication devices, the Internet will be affecting
more lives than ever before. Security and privacy concerns along with e-business regulatory issues will become more
prevalent. It will become more difficult to figure out who you can trust online; with all the unethical, illegal, and Internet
marketing and online advertising frauds and Ebusiness email scams.
Important Ethical E-Business Legal Issues

If you are writing copy and maintaining a client's ebusiness or ecommerce website consider the following consumer privacy
and legal matters:
What you say when copywriting and publishing for a client is a reflection of how they are viewed to the rest of the world.
Negative or defamatory articles published about various people and companies on other websites, if not properly researched,
could possibly have legal consequences of libel that can stretch across countries. Additionally, consider carefully what is
published on Weblogs or Blogs for short. A blog is simply a website where daily, weekly, or monthly personal or corporate

Prepared By: John Romeo V. Etis 


8
COMP03 - Introduction to World Wide Web
The Easiest way to learn about the Internet and the Web

thoughts, ideas, and happenings can be published and shared with others. Interaction with readers can be set up in the form
of comments from visitors. Typically blog sites can be set up for free. View the CyberJournalist.net: A Bloggers' Code of
Ethics for a suggested guide to publishing on a blog.
If webmasters perform unethical optimization of a client's website, it could have long lasting negative business
consequences for that client that can not be easily repaired. Consequences that at first glance may seem insignificant. People
are getting more savvy online. They are starting to see the e business false advertising that is upon us. Beware, it's just a
matter of time until we hear more stories and legal action taken.

Intellectual Property

When dealing with ethics in a B2B company and B2C clients there is a major degree of trust and responsibility that is
imparted to a person or group that maintains the Web site. It is very important from both an ethical values based ebusiness
and legal B2B and B2C perspective to make sure that the written words and what is portrayed about a company are factual.
Because issues arise involving marketing ethics and the importance of understanding a business for Internet marketing
issues and advertising purposes, there are potential areas for revealing trade secrets or intellectual property if proper B2B
ethical behavior is not followed.
Email correspondence should be private and confidential. While certain individuals might not see any harm quoting it on the
Web from an email sent, it is always advisable to get a person's consent prior to publishing anything. While the person
might give consent, they might not realize the full implications, Online privacy issues, or impact of having it published
online. Therefore, it would be wise to consider it very carefully before even asking for their approval.

Ethical Issues In e-Business And Challenges For Implementing e-Commerce

There are many legal and web site regulatory issues involved. Electronic copyright, e-commerce, credit/cash policies,
international trade, tariffs, privacy, digital media offers, and security are a few of the items to be considered. See: Business
ethics manual procedures & standards for ethics compliance in e-business from: Center for Virtual Organization and
Commerce @ LSU, "Business-to-Business Ecommerce, Supply Chain Management" B2B Challenges

Trust, Importance of Ethics, US Government Regulations


 The Ethics of Internet Marketing
 E-business legal, ethical, and regulatory issues with B2B and B2C
 Marketing on B2B Web site
 Ethics B2B Copyright Law
 Ethical B2B Practices
 Marketing Ethics Issues U.S.A
 B2B vs B2C legal
 E-commerce Ethical Facts site:.gov
 Ethics In Advertising site:.gov
 Advertising And Marketing On The Internet - Honesty

I am sure there are many more items related to b2b and b2c ethics on a B2B and a B2C site. Here are other B2B ethical
issues (copyright) to be aware of: e-business ethical issues and B2B versus b2c. Websites examples of: What are the
regulatory issues for a b2b site? (meta search engine robots topic) The e-business regulatory issues with B2B and B2C in the
U.S. compared to AU. and other nations.

Email Marketing

Email has a number of regulations implemented by the US government. Email marketing (opt-in Vs. opt-out, Vs. double
opt-in) View IAB, Interactive Advertising Bureau Standards and Guidelines - eMail Guidelines. Share your comments at
unsolicited b2b and b2c emails "The Email Junk Mail Trash Heap" Pop up ads, email, instant messengers, consumer privacy
information, and online security threats. Ads that make you double click at a wrong location and the very click installs some
sort of adware, spyware, or malware on your computer. See: "CPACSA" [Consumer Protection Against Computer Spyware
Act]

Consumers Survey Scams And Hoaxes

Prepared By: John Romeo V. Etis 


9
COMP03 - Introduction to World Wide Web
The Easiest way to learn about the Internet and the Web

This is one to watch out for closely! Beware Phone "Survey" Scams, "Charity" Appeals for Chainmail, online security, and
spam. Another area that can be a real pain, is "The Never-Ending Hoax Viruses". See: http://www.sans.org/rr for other
articles related to consumer security.

Copyright Infringement

Watch out for this particular crime of sites that copy your website text (legal issues) or name while trying to pawn off some
other item they are selling (as though you are indorsing it - NOT) See: copyright law "Digital Millennium Copyright Act"

Website Issues

Unethical redirects to other pages with completely different information than what was shown in the search results. For an
example (*note: site may no longer be available. *** Warning See: webmasters guidelines) of this type of spamming ethical
issues in B2C website: do a search for ethical and legal issues on a B2B vs. B2C website. One of the top results is/was an
example of Internet ethics cheating, involving ethics in B2B and B2C online, from an online group that promotes cheating.
What an oxymoron! (additional research notes) Software for detecting plagiarism. (See copyright violation issues)
Accidental duplicate B2B versus B2C marketing pages or others, OR additional search engine spam (repetitive results fed
back in to self) AND the copying of search engine results should be deleted.

Advertising And Keywords Scams

Unethical spyware/adware companies are promoting themselves as: "get to the top of Google, Yahoo, and MSN search
guaranteed for your keywords." These companies are using the term "Search Engine Data Merging." Spyware and adware is
installed on some users computers then they sell keywords to professionals for thousands of dollars a year. This is a huge
money making scam.
The company is using various names: Search Elevators, Link Positions, Window Billboards Network, Winspeed Network,
Real Positions Network, Keywords Guru, and even a new search engine labeled RedZee Search. Read more: Advertising
Scam - Search Engine Data Merging.

Identity Theft & Internet Fraud


Identity theft is a major problem of which I have personal experience with. That's a different story and continues on.
Beware, that this issue is related to online B2C ethical business issues and legal issues. For help see: Federal Trade
Commission - Your National Resource for ID Theft + Better Business Bureau, BBB.
B2B legal, ethics, regulatory b2c ethical, Internet Businesses e-commerce legal issues articles and help can be found at the
Internet Fraud Complaint Center, which has information about the various topics as well as filing a complaint. Intellectual
property, Patents, Trademarks, Policy and Law Reports, & additional reference material can be found at United States
Patent and Trademark Office.

Definition Of Ethical Issues In B2B, Ethics In B2B And B2C Defined

"A set of principles of right conduct" - Search


"The rules or standards governing the conduct of a person or the conduct of the members of a profession" - Online
dictionary ethics

Security and ethical challenges

Information technology can support both beneficial and detrimental effects to a business and society on a whole. The use of
information technology in e-business operations presents major security challenges, poses serious ethical questions, and
affects society in significant ways. Some of the important aspects are shown on this slide. In this lecture we will discuss
these issues and describe how business professionals should act to minimize the detrimental effects of e-business systems.

Privacy Issues. The power of information technology to store and retrieve information can have a negative effect on the
individuals’ right to privacy. The Internet itself gives users a feeling of anonymity while actually being quite the opposite.
Important privacy issues being debated in business and government include:

Violation of Privacy. Accessing individuals’ private e-mail conversations, and/or collecting and sharing information about
individuals without their knowledge or consent.

Prepared By: John Romeo V. Etis 


10
COMP03 - Introduction to World Wide Web
The Easiest way to learn about the Internet and the Web

Unauthorized Personal Files. Collecting telephone numbers, credit card numbers, e-mail addresses, and other personal
information to build individual customer profiles

Computer Monitoring. Using technology to monitor conversations, employee productivity or an individual’s movement.

Computer Matching. Using customer information gained from multiple sources to create customer profiles that can be sold
to information brokers or other companies and used to market business services.

User Privacy Protection. Privacy Laws attempt to address some of these issues. The Electronic Communications Privacy
Act and the Computer Fraud and Abuse Act prohibit intercepting data communication messages, stealing or destroying data.
The Computer Matching and Privacy Act regulates the matching of data held in federal agency files. Individuals can also
protect their privacy by using such software and services like encryption and anonymous remailers.

Censorship. The right of people to know about matters others may want to keep quiet, the rights of people to express their
opinion, and to publish those opinions, is the center of a major debate between the rights of the individual and the rights of
society. Issues regarding spamming, flaming, pornography, and copyright protection are just some of the issues being
debated by various groups and government

Computer Crime

Computer crime is a growing threat to today’s e-business. It is defined as the unauthorized use, access, modification, and
destruction of information, hardware, software or network resources, and the unauthorized release of information. There are
several major categories of computer crime that include:

Hacking. The unauthorized access and use of networked computers. Examples of common hacking tactics include
Spoofing, Trojan Horses, Logic Bombs, Denial of Service, War Dialing, and Scans. These tactics can be used to retrieve
passwords, access or steal network files, overload computer systems, or damage data and programs

Cyber Theft. Electronic breaking and entering involving the theft of money. More recent examples involve using the
Internet to access major banks’ computer systems.

Unauthorized Use at Work. Unauthorized use of computer systems and networks by employees. Recent surveys suggest
90% of U.S workers admit to using work resources for personal use.

Piracy. Software piracy is the unauthorized copying of software and is a violation of federal copyright laws. Such piracy
results in millions of dollars of lost profits by software publishers.

Computer Viruses. A virus is a program that once inserted into another program can spread destructive program routines
that can result in destroying the contents of memory, hard disks, and other storage devices. The use of antivirus programs
can reduce the risk of receiving a virus.

Ten Commandments of Computer Ethics

The Ten Commandments of Computer Ethics were created in 1992 by the Computer Ethics Institute. The commandments
were introduced in the paper "In Pursuit of a 'Ten Commandments' for Computer Ethics" by Ramon C. Barquin as a means
to create "a set of standards to guide and instruct people in the ethical use of computers." The Ten Commandments of
Computer Ethics copies the style of the Ten Commandments from The Bible and uses the archaic "thou shalt" and "thou
shalt not" found in the King James version.
The commandments have been widely quoted in computer ethics literature but also have been criticized by both the hacker
community and some in academia. For instance, Dr. Ben Fairweather of the Centre for Computing and Social Responsibility
has described them as "simplistic" and overly restrictive.
The CISSP — an organization of computer security professionals — has used the commandments as a foundation for its
own ethics rules.

Certified Information Systems Security Professional (CISSP) is an independent information security certification
governed by the International Information Systems Security Certification Consortium (commonly known as (ISC)²). As of
October 10, 2008, (ISC)² has reported certifying 61,763 information security professionals in 133 countries.

Prepared By: John Romeo V. Etis 


11
COMP03 - Introduction to World Wide Web
The Easiest way to learn about the Internet and the Web

The Commandments
1. Thou shalt not use a computer to harm other people.
2. Thou shalt not interfere with other people's computer work.
3. Thou shalt not snoop around in other people's files.
4. Thou shalt not use a computer to steal.
5. Thou shalt not use a computer to bear false witness.
6. Thou shalt not use or copy software for which you have not paid.
7. Thou shalt not use other people's computer resources without authorization.
8. Thou shalt not appropriate other people's intellectual output.
9. Thou shalt think about the social consequences of the program you write.
10. Thou shalt use a computer in ways that show consideration and respect.
COMP03 Course Module: Midterm Period

FAMILIARIZATION WITH WEB TOOL

Web Browser
- is a software application that enables a user to display an interact with text, images, videos, music and other information
typically located on a web page at a website on the WWW or LAN. Text and images on a Webpage can contain hyperlinks to the
other web pages at the same or different websites. Web browsers allows the users to access information on the web pages by
traversing these links.

Example: Internet Explorer, Mozilla Firefox, Safari, Opera, Netscape Navigator, Mosaic
- Web browsers are the most commonly used type of HTTP user agent. – can also access information provided by Web servers
in private networks or content in file systems.

Netscape Navigator – “Netsapce” – 1990’s


Different Versions: Netscape Communicator, Netscape 6, Netscape 7, Netscape 8, Netscape 9 (May 1, 2007)

Netscape Communicator – produced by Netscape Communications Corporation; initially resleased in June 1997.
Versions: Netscape Communicator 4.0 1. Professional
Netscape Communicator Editions 2. Complete

Internet Explorer – “MSIE” – Microsoft Internet Explorer


- “IE” – is a series of graphical web browsers developed by Microsoft – 1995 for Windows ’95 (add-on package)
- Versions: IE5, IE6, IE7.
- Additional Versions: Internet Explorer for Mac, Internet Explorer for UNIX
- Recent release – IE7.0 – for Windows XP, Windows Server 2003, Windows Vista.
- Windows Mobile Browser known as “Internet Explorer Mobile”
- it has been the most widely used web browser since 1999.

Yahoo Inc.
– is an American public corporation and global internet services company.
- provides: search engines, web portal, Yahoo! Directory, Yahoo! Mail, news, postings
- founded by Jerry Yang and David Filo in January 1994.
- Products and Services:

1. Search – it provides search services such as: a. Yahoo! Image


b. Yahoo! Video
c. Yahoo! Local
d. Yahoo! News
e. Yahoo! Shopping Search
2. Communication – it provides internet communication such as: a. Yahoo! Mail
b. Yahoo! Messenger
c. Yahoo! Personals
d. Yahoo! 360 degrees
3. Content – it provides information about products: a. Yahoo! Sports
b. Yahoo! Finance
c. Yahoo! Music

Prepared By: John Romeo V. Etis 


12
COMP03 - Introduction to World Wide Web
The Easiest way to learn about the Internet and the Web

d. Yahoo! Games
e. Yahoo! Movies
4. Mobile – on the go messaging such as e-mail, instant messaging, moblogging, search and alerts, fun & games,
including ringtones, mobile games, Yahoo! Photos
Excite – is an internet portal and one of the “dotcoms” of the 1990’s
- offers a variety of services including: a. search
b. web-based e-mail
c. instant messaging
d. stock quotes
e. a customizable user homepage
- was founded in 1994 by Graham Spencer, Joe Kraus, Mark Van Harren, Ryan McIntyre, Ben Lutchand
Martin Reinfried.
mail.excite.com – free web-based e-mail
games.excite.com – offers casino games
search.excite.com – excite metasearch tool
news.excite.com – for late-breaking news
travel.excite.com – offers destinational guides, hotel and flight reservations, rental cards, travel tips.

Mosaic – was the first popular WWW browser and Gopher client.
- it was reliable and easy to install, which opened the web up the general public.
- was the first browser to implement images embedded in the text, rather than displayed in a separate window.
- was developed at the ‘NCSA (National Center for Supercomputing Applications) – year 1992.
- was released year 1993.
- developed by Marc Andreesen and Eric Bina.
- Version 1.0 – April 22, 1993
- Version 2.0 – December 1993

Information Retrieval:
- Lycos
- Yahoo
- Excite

Lycos – is a search engine and web portal centered around broadband entertainment content.
- developed in 1994 by Dr. Michael Loren Mauldin.
- top 5 Internet Portal, behind Yahoo, MSN, AOL and MySpace.
- Network Sites: 1. AngelFire – a Lycos property providing free webhosting, blogging, web publishing tools.
2. Gamesville – Lycos massive multiplayer gaming site.
3. Hotbot – a Lycos owned search engine.
4. HTMLGear – a Lycos property providing web-page add-ons (guestbooks, etc.).
5. Tripod.com – a Lycos property providing free web-hosting, blogging, web publishing tools.
6. Webmonkey – web-building help and tutorials.
7. WhoWhere.com – a people search engine.

Lycos – Branded Site:


1. MailCity.com – Lycos free e-mail provider.
2. Lycos cinema – online video and social networking site.
3. Lycos MIX – a video play list, chat and social networking site.

Former Lycos site:


1. GetRelevant – a Lycos online advertising site.
2. Quote.com – a finance site.
3. Matchmaker.com – a dating site.

Website - is a collection of Web pages, images, videos or other digital assets that is hosted on one or several Web server(s),
usually accessible via the Internet, cell phone or a LAN.

Types of Websites
1. Corporate Website – used to provide background information about a business, organization, or service.

Prepared By: John Romeo V. Etis 


13
COMP03 - Introduction to World Wide Web
The Easiest way to learn about the Internet and the Web

2. Commerce Site or eCommerce Site – for purchasing goods.


Ex. Amazon.com
3. Community Site – a site where persons with similar interests communicate with each other, usually by chat or message
boards.
4. Database Site – a site whose main use is the search and display of specific database content.
5. Development Site – a site where purpose is to provide information and resources related to software development, web
design.
6. Directory Site – a site that contains varied contents which are divided into categories and subcategories. Ex. Yahoo!
Directory
7. Download Site – strictly used for downloading electronic content, such as software, game, demos or computer wallpaper.
8. Employment Site – allows employers to post job requirements for a position and prospective employees to fill an application.
9. Game Site – where many people come to play.
10. Information Site – contains a content that is intended to inform visitors.
Ex. RateMyProfessors.com, Encyclopedia
11. News Site – dispensing news and commentary.
12. PHISH Site – a website created to fraudulently acquire sensitive information such as password and credit card details.
13. Political Site – a site on which people may voice political views.
14. Pornography Site – a site that shows pornographic images and videos.
15. Rating Site – a site on which people can praise what is featured.
16. Search Engines – provides general information
17. Shock Site – includes images or other material that is intended to be offensive to most viewers.
Ex. Rotten.com
18. Blog or Web Blog – sites generally to post online diaries which may include discussions forum.
19. Fan Site – a site created and maintained by fans of and for a particular celebrity.
20. Geodomain – refers to domain names that are the same as those of geographic entities, such as cities and countries.
Ex. Richmond.com -> Richmond, Virginia
21. Java Applet Site – contains software to run over the web as a Web application.
22. Mirror (computing) Site – a complete reproduction of a website.
23. Review Site – is a site on which people can post reviews for products or services.
24. Warez – a site filled with illegal download.
25. WIKI Site – a site which users collaboratively edit (such as Wikipedia)
26. Gripe Site – a site devoted to the critique of a person, place, corporation, government, or institution.
27. Erotica Website – shows sexual videos and images.

History:
The first online website appeared in 1991. On April 30, 1993, CERN announced that the World Wide Web would be
free to anyone. A copy of the original first web page, created by Tim Berners-Lee.

Organized by function a website may be:


1. a personal website 3. a government website
2. a commercial website 4. a non-profit organization website

Prepared By: John Romeo V. Etis 


14
WEBSITE STYLES

 A Static Website is one that has web pages stored on the server in the same form as the user will view them. It is primarily
coded in HTML (Hyper-text Markup Language).
A static website is also called a Classic website, a 5-page website or a Brochure website because it simply presents pre-
defined information to the user. It may include information about a company and its products and services via text, photos,
Flash animation, audio/video and interactive menus and navigation.

This type of website usually displays the same information to all visitors, thus the information is static. Similar to handing out
a printed brochure to customers or clients, a static website will generally provide consistent, standard information for an
extended period of time. Although the website owner may make updates periodically, it is a manual process to edit the text,
photos and other content and may require basic website design skills and software.
In summary, visitors are not able to control what information they receive via a static website, and must instead settle for
whatever content the website owner has decided to offer at that time.
They are edited using four broad categories of software:

 Text editors, such as Notepad or TextEdit, where the HTML is manipulated directly within the editor program
 WYSIWYG offline editors, such as Microsoft FrontPage and Adobe Dreamweaver (previously Macromedia
Dreamweaver), where the site is edited using a GUI interface and the underlying HTML is generated automatically by the
editor software
 WYSIWYG Online editors, where the any media rich online presentation like websites, widgets, intro, blogs etc. are
created on a flash based platform.
 Template-based editors, such as Rapidweaver and iWeb, which allow users to quickly create and upload websites to a web
server without having to know anything about HTML, as they just pick a suitable template from a palette and add pictures
and text to it in a DTP-like fashion without ever having to see any HTML code.

 A Dynamic Website is one that does not have web pages stored on the server in the same form as the user will view them.
Instead, the web page content changes automatically and/or frequently based on certain criteria. It generally collates
information on the hop each time a page is requested.
A website can be dynamic in one of two ways. The first is that the web page code is constructed dynamically, piece by piece.
The second is that the web page content displayed varies based on certain criteria. The criteria may be pre-defined rules or
may be based on variable user input.

The main purpose behind a dynamic site is that it is much simpler to maintain a few web pages plus a database than it is to
build and update hundreds or thousands of individual web pages and links. In one way, a data-driven website is similar to a
static site because the information that is presented on the site is still limited to what the website owner has allowed to be
stored in the database (data entered by the owner and/or input by users and approved by the owner). The advantage is that
there is usually a lot more information stored in a database and made available to users.

A dynamic website also describes its construction or how it is built, and more specifically refers to the code used to create a
single web page. A Dynamic Web Page is generated on the fly by piecing together certain blocks of code, procedures or
routines. A dynamically-generated web page would call various bits of information from a database and put them together in
a pre-defined format to present the reader with a coherent page. It interacts with users in a variety of ways including by
reading cookies recognizing users' previous history, session variables, server side variables etc., or by using direct interaction
(form elements, mouseovers, etc.). A site can display the current state of a dialogue between users, monitor a changing
situation, or provide information in some way personalized to the requirements of the individual user.

COMP03 Course Module: Final Coverage

WEB DESIGN PRINCIPLES

I. Website Design Principle

A. Design for the Medium


When designing a web site, remember the destination is a computer, not the printed page, and the language is hypertext, not
linear text. As a web page designer, you must create web pages specifically for the computer screen. Give users the options to
follow the information path they desire by providing appropriate links related topics. Make them feel comfortable at your site
by letting them know where they are and where they can go.

1. Craft the look and feel


The interface that the user must navigate often is called the look and feel of a website. Users look and feel when they
explore the information design of your site.

2. Make your design portable


Your website design must be portable and accessible across different browsers, operating systems, and computer
platforms. Many designers make the mistake of testing in only one environment, assuming that their pages look the
same to all of their users.

3. Design for low bandwidth


Plan your pages so that they are accessible at a variety of connection speeds. If your pages download slowly because
they contain large, detailed graphics or complicated animations, your users will leave before they ever see your
content.

4. Plan for clear presentation and easy access to your information


Your information design – the presentation and organization of your information – is the single most important
factor in determining the success of your site. Your graphics and navigation options – the look and feel of your site –
must present a variety of options to the user without detracting from their quest for information.

B. Design the Whole Site


When designing your site, plan the unifying themes and structure that will hold the pages together. Your choices of colors,
fonts, graphics and page layout should communicate a visual theme to the user that orients them to your site’s content. The
theme to the user that orients them to your site’s content.

1. Create smooth transitions


Plan to create a unified look among the sections and pages of your site. Reinforce the identifying elements of the site
and create smooth transitions from one page to another by repeating colors and font and by using a page layout that
allows different hierarchical levels. Avoid random, jarring changes in your format, unless this is the effect you want
to achieve.

2. Use a grid to provide visual structure


The structure of a web page is imposed by the grid or page template you choose for your web page design. The grid
is a conceptual layout device that organizes the page into columns and rows. You can impose a grid to provide
visual consistency throughout your site.

3. Use of active white space


White spaces are the blank areas of a page. Use white space deliberately in your design, rather than as an
afterthought. Good use of white space guides the reader and defines the areas of your page. White space that is used
deliberately is called active white space.
The main age and secondary page share a number a characteristics:
1. Consistent background graphics
2. Consistent placement of navigation information
3. Vertical rule that provides structure
4. Consistent font usage
5. Logo that brands the site
6. Generous areas of active white space

The continuity between these pages enforces the feeling of a whole piece of work. The understated fonts and colors
and the quiet background graphics provide an appropriate museum-like impression. One design rule to note – the
logo should remain in the same place on all pages for consistency. Users may otherwise look for reasons the logo
has moved, which distracts them from your message.

C. Design for the user


Keep your design efforts centered solely around your user. Knowing your audience answers almost all design questions – if it
serves the audience keep it; if it is potentially distracting or annoying, eliminate it. Find out what users expect from your site.

1. Design for interaction


Think about how the user wants to interact with the information on your Web page. Design for your content type, and
decide if the user will read or scan your pages.

2. Design for Location


It is difficult to predict the user’s exact viewing path. There is, however, general agreement of screen real estate ranked in
order of importance. During page design, rank the information you want to display, and then position the most important
in the middle of the window, the next most important across the top, and so on, with the least important or static
information in the left margin.

3. Guide the user’s eye


The user can traverse a page in a variety of ways. Human engineering studies show a wide range of results when tracking
user’s eye movements.

4. Keep a flat hierarchy


Do not make users navigate through too many layers of your website to find the information they want. Structure your
website to include section or topic-level navigation pages so users quickly find their path.

5. Use the power of Hypertext Linking


Unlike paper-based authors, as a hypertext author you have the luxury of adding clickable text and images where
necessary to guide users through your information. This powerful ability comes with a measure of responsibility. You
make the decisions that determine how users move though your site and process other information.

D. Design for the screen


The computer display, the destination for your web pages, is very different from print-based media. You must take the
following differences into account when planning your website:

 The shape of a computer screen. Although most paper-based most paper-based media are portrait-
oriented, the computer screen is landscape oriented – that is, wider than it is tall. Your page design must
reflect the space within which it will be displayed and read.

 While a piece of paper reflects light, a computer screen has light passing though it from behind.
This changes the nature of the colors and contrasts you choose to empty. Design pages that provide enough
contrast for the user to read, but not so much that the colors distract from the content easily. Avoid a light
text on a light background and dark text on dark backgrounds.

 Computer screens use much lower resolution than the printed page. Graphics and text that would
look fine on a laser printer at 600 dpi are coarse and grainy at 72 dpi, the typical resolution for a computer
monitor.

A screen is not a page


Although tempting, it often is a poor choice to take documents that are formatted for print and post them online
without considering the destination medium.

INTERNET CODE OF CONDUCT


MAILING LIST, NEWSGROUPS AND BULLETIN BOARD
1. Post with in the forum’s scope/topic.
2. Avoid redundant, empty, or stupid postings.
3. Respect the opinions of other participants.
4. Be careful about the lack of social cues and possible ambiguities and text communications.
5. Use common courtesy when posting critical negative comments (avoid flaming).
6. Be sensitive to the forum’s standards in respect to obscenity.
7. Do not use expression that are considered harassing, rapid or in some way discriminatory.

ADVERTISING
1. Do not post to list or boards or newsgroups whose purpose states no advertising.
2. Use browsing services such as WAIS, Gopher and WWW to list products and services.
3. Use e-mail enabled information services like mailing list to users can subscribe or send to obtain information.

PRIVACY
1. Do not invade the personal privacy of the other users.
2. Do not forward e-mail without permission.
3. Do not deliberately break into computer systems.

SECURITY
1. Systems breaks-in or adding others to break into systems is illegal.
2. Getting passwords or other access information fraudulently is unaccepted.

INTELLECTUAL PROPERTY - Copying or making available copies of protected works without permission of author is
illegal.

E-MAIL ETHICS
1. Let your messages have a personal touch.
2. Be friendly, use humor to break up the tension.
3. Be considerate of the recipient’s time and online changes.
4. Know your recipient. Different people have different ideas of what is acceptable.
5. Avoid using E-mail to express anger. With E-mail once it’s sent, it’s gone.
6. Be Brief.
7. Make the subject line precise.
8. Don’t copy the full text of a long message into your response. Copy only the parts you need to refer to.
9. Don’t assume that everybody lives emoticons (Emotional Icons), others find them annoying.
10. Read the message before sending it.
SMILEYS (Emoticons)

:-) - Happy :-|| - Angry


:-(( - Very sad :-D - Laughing
:-O - Surprised :-( - Sad
:-e - Disappointed :-* - Kiss
%-( - Confused :-I - Indifferent
:-)) - Very happy >:-< - Mad
;-) - Wink :’-( - Crying
:-@ - Screaming [-O< - Praying
COMMON ABBREVIATIONS YOU CAN USE

AFAIK as far as I know BRB be right back


BCNU be seeing you BTW by the way
BFN bye for now FAQ frequently asked questions
CUL/CUL8
R see you later HTH hope this helps
G grin IJWTS I just want to say
GTG got to go IMHO In my humble opinion
IJWTK I just want to know OAO over and out
IMO in my opinion OTAH on the other hand
LOL laughing out loud RUOK are you ok?
OIC oh I see TNX/THX thanks
ROTFL rolling on the floor laughing TYVM thank you very much
TIA thanks in advance
AFK away from keyboard
MAJOR AREAS FOR WEB DESIGN
- How to develop a website that stands-out.
- How to identify your audience.
- Which new web technologies you should incorporate.

TOOLS FOR CREATING WEBPAGES


1. HTML 4. JavaScript, VBScript, PERL
2. Scripts, Applet, Servlets 5. XML, WML
3. Active X Controls
WEB PAGES PACKAGES
1. Microsoft Office FrontPAge 3. Macromedia Dreamweaver
2. Adobe Go Live 4. Macromedia Flash
WEB DESIGN
1. Writer/Editor 4. Web page designer
2. Multimedia Developer 5. Web programmer
3. Artist/Graphic Designer 6. Web master

HTML - HyperText Mark-Up Language WML – Wireless Mark-Up Language


CGI – Common Gateway Interface VRML – Virtual Reality Modeling Language
XML – Extensible Mark-up language WAP – Wireless Application Protocol

ADVATAGES OF WEB PUBLISHING


1. Timeliness BASIC DESIGN PRINCIPLES
2. Interactivity 1. Balanced Proximity
3. Reduced Production Cost 2. Contrast and focus
4. Economical, Rapid Distribution 3. Unity

CRITERIA TO CONSIDER FOR WRITING TECHNICAL ISSUES TO HAVE A GOOD


WEB PAGES DESIGN
1. Accutate 1. Bandwidth
2. Easily Read 2. Browser Variables
3. Understandable 3. Monitor Resolution
4. Comprehensive and Consize
LEGAL AND ETHICAL ISSUES
1. Copyright
2. Privacy and Security

RESOURCES YOU NEED TO CONSIDER IN DESIGNING A WEB SITE


1. Hardware and Software 3. Budget
2. Staffing 4. Managerial and Administrative Support
STEPS IN DEVELOPING A DESIGN PLAN
FOR WEBSITE WEB SITE CONTENT ELEMENTS
1. Define a purpose 1. Text
2. Identify the Audience 2. Photos
3. Plan the Content 3. Animation
4. Plan the structure 4. Video
5. Plan the web pages 5. Audio
6. Plan the navigation 6. Dynamically generated content

ASP – Active Server Pages


SPLASH PAGE – it provides an element of interest that draws visitors into your website.
HOME PAGE – it is the first web page your visitor will see

5 Things to consider in establishing a visual 7 Navigation element


connection 1. Text
1. Color scheme 2. Button
2. Layout 3. Image maps
3. Grid 4. Menus
4. Table 5. Site index
5. Style sheet 6. Search engines
7. Frames
2 Types of Style Sheet – external, internal

CSS (Cascading Style Sheet)


- As a generated rule, you have to limit to how many numbers of colors in your scheme.
- (3 colors)

HOW THE WEB WORKS USING JAVASCRIPT

JavaScript is a scripting language widely used for client-side web development. It was the originating dialect of the
ECMAScript standard. It is a dynamic, weakly typed, prototype-based language with first-class functions. JavaScript
was influenced by many languages and was designed to look like Java, but be easier for non-programmers to work with.

Although best known for its use in websites (as client-side JavaScript), JavaScript is also used to enable scripting access
to objects embedded in other applications (see below).

JavaScript, despite the name, is essentially unrelated to the Java programming language, although both have the
common C syntax, and JavaScript copies many Java names and naming conventions. The language's name is the result
of a co-marketing deal between Netscape and Sun, in exchange for Netscape bundling Sun's Java runtime with their
then-dominant browser. The key design principles within JavaScript are inherited from the Self and Scheme
programming languages.

"JavaScript" is a trademark of Sun Microsystems. It was used under license for technology invented and implemented
by Netscape Communications and current entities such as the Mozilla Foundation.

What are events?


Events allow you to write JavaScript code that reacts to certain situations. Examples of events include:
 The user clicking the mouse button
 The Web page loading
 A form field being changed

Event Event handler Description

Abort onAbort
Executes JavaScript code when the user aborts the loading of an image.

Blur onBlur
Executes JavaScript code when a form element loses focus or when a window or frame loses focus.

Change onChange
Executes JavaScript code when a Select, Text, or Textarea field loses focus and its value has been modified

Click onClick
Executes JavaScript code when an object on a form is clicked.

DblClick onDblClick
Executes JavaScript code when the user double-clicks a form element or a link.

DragDrop onDragDrop
Executes JavaScript code when the user drops an object onto the browser window, such as dropping a file.

Error onError
Executes JavaScript code when the loading of a document or image causes an error.

Focus onFocus

Prepared By: Ms. Ircelle Tolentino Galven 


AMA Education Systems
21
Executes JavaScript code when a window, frame, or frameset receives focus or when a form element receives input
focus.

KeyDown onKeyDown
Executes JavaScript code when the user depresses a key.

KeyPress onKeyPress
Executes JavaScript code when the user presses or holds down a key.

KeyUp onKeyUp
Executes JavaScript code when the user releases a key.

Load onLoad
Executes JavaScript code when the browser finishes loading a window or all frames within a FRAMESET tag.

MouseDown onMouseDown
Executes JavaScript code when the user depresses a mouse button.

MouseMove onMouseMove
Executes JavaScript code when the user moves the cursor.

MouseOut onMouseOut
Executes JavaScript code each time the mouse pointer leaves an area (client-side image map) or link from inside that
area or link.

MouseOver onMouseOver
Executes JavaScript code once each time the mouse pointer moves over an object or area from outside that object or
area.

MouseUp onMouseUp
Executes JavaScript code when the user releases a mouse button.

Move onMove
Executes JavaScript code when the user or script moves a window or frame.

Reset onReset
Executes JavaScript code when a user resets a form (clicks a Reset button).

Resize onResize
Executes JavaScript code when a user or script resizes a window or frame.

Select onSelect
Executes JavaScript code when a user selects some of the text within a text or textarea field.

Submit onSubmit
Executes JavaScript code when a user submits a form.

Unload onUnload
Executes JavaScript code when the user exits a document.

Prepared By: Ms. Ircelle Tolentino Galven 


AMA Education Systems
22
JAVASCRIPT DOCUMENT OBJECT

The Document object is part of the Window object. The document object is used to access all elements in a page. The
document object provides access to the elements in an HTML page from within the script.

General syntax of document object:

window.document

There are many properties and methods available for the document object.

Some of these are mentioned and briefly explained below:

Properties of document Object:

* alinkColor * images
* anchors * lastModified
* applets * layers
* bgColor * linkColor
* cookie * links
* domain * plugins
* embeds * referrer
* fgColor * title
* formName * URL
* forms * vlinkColor

Methods of document Object:

* captureEvents * handleEvent
* close * open
* getElementById * releaseEvents
* getElementsByName * routeEvent
* getElementsByTagName * write
* getSelection * writeln

In the next few sections, these properties and methods of the document object with examples will be examined.

This section discusses the properties alinkColor, anchors applets, bgColor, cookie and domain in detail with examples
given for each.

Properties of document Object:

alinkColor:

This property can be used if the programmer wishes to define the color of an active link.

The general syntax for using the alinkColor property of document object is as follows:

document.alinkColor = "Information of color"

Prepared By: Ms. Ircelle Tolentino Galven 


AMA Education Systems
23
Here the "Information of color" is a string that is given either as a hexadecimal representation or, directly, as a literal
description denoting the color of the active link needed.

anchors:

If a document has a number of anchor objects and a programmer wants to refer to the document, then the anchors
property can be used. The anchors property is an array that references all anchor objects associated with the current
document.

The general syntax for using the anchor property is as follows:

document.anchors["anchorID"]

Here "anchorID" is the identification of the anchor that the programmer wants to refer to.

applets:

If a document has a number of Applet objects and if the programmer wants to refer to the document, then the applets
property can be used. The applets property is an array that references all Applets objects associated with the current
document.

The general syntax for using the applets property is as follows:

document.applets["appletID"]

In this example, "appletID" is the identification of the applet that the programmer wants to refer to.

bgColor:

This property can be used if the programmer wishes to define the background color of the document.

The general syntax for using the bgColor property of a document object is as follows:

document.bgColor = "Information of color"

Here, the "Information of color" is a string that is given either as a hexadecimal representation, or directly, as a literal
description denoting the background color of the document needed.

cookie:

The cookie property is used to set or return all cookies associated with the current document.

The general syntax for using the cookie property of a document object is as follows:

document.cookie

An example to understand its usage in brief:

<html>

Prepared By: Ms. Ircelle Tolentino Galven 


AMA Education Systems
24
   <body>
      <script type="text/javascript">
         document.write("The Associated Cookie with this
         document is: " + document.cookie)

      </script>
   </body>
</html>

Output of the above script is

The Associated Cookie with this document is: ABCWEYUWYEUWYUE

The cookie associated with the current document displays.

domain:

The domain property is used to set or return the domain name of the server where the current document originated.

The general syntax for using the domain property of document object is as follows:

document.domain

An example to understand its usage in brief:

<html>
   <body>
      <script type="text/javascript"> The
         document.write("The Document's Domain Name is: " + output of
         document.domain) the above
program
is
      </script>
   </body> The
</html>

Document's Domain Name is: www.exforsys.com

The current document’s domain name displays.

embeds:

When a programmer wants to refer to all the embedded objects in a current document, then he or she can make use of
the embeds property.

The general syntax for using the embeds property is as follows:

Prepared By: Ms. Ircelle Tolentino Galven 


AMA Education Systems
25
document.embeds["Id_of_embed_obj"]

Document Object properties


Properties Description

body References the body element of the page. From there, you can then access other nodes
contained within the body.

body.offsetWidth,
Returns the width and height of the entire document, respectively.
body.offsetHeight

compatMode Returns the compatibility mode of the current document, specifically, whether the page is
rendered in Quirks or Stricts mode. The two possible values returned are "BackCompat" for
Quirks and "CSS1Compat" for Strict. Useful for determining the doctype setting of the page
and executing different code accordingly.

Example(s):

if (document.compatMode=="CSS1Compat")
// execute code for page with a valid doctype
doctype Read-only property that returns the Document Type Definition (DTD) of the current
document, or null if the page doesn't contain a DTD. Not supported in IE as of IE6.

documentElement References the root element of the document, in the case of HTML documents, the html
element. This read only property is useful for accessing all elements on the page, such as the
HEAD.

Example(s):

entiredoc = document.documentElement;
var docnodes=entiredoc.childNodes
for (i=0; i<docnodes.length; i++)
alert(docnodes[i].tagName)
domain Gets/sets the domain of the current document. Useful in cross domain scripting when one
domain is to communicate with another.

Example(s):

document.domain="javascriptkit.com"
implementation Returns the DOM implementation of the current document.

ownerDocument Returns a reference to the document object that contains the current element/node.

var ownerdoc=document.getElementById("adiv").ownerDocument
readyState IE exclusive property that specifies the loading status of the document. It returns one of the
below 4 values:

Prepared By: Ms. Ircelle Tolentino Galven 


AMA Education Systems
26
1) uninitialized- The document hasn't started loading yet.
2) loading- The document is loading.
3) interactive- The document has loaded enough whereby user can interact with it.
4) complete- The document has fully loaded.

styleSheets[] An array referencing all stylesheet objects on the page, whether they are defined using the
<style> or <link> tag.

title Specifies the title of the document. Read/write in modern browsers.

URL A string that specifies the complete URL of the document.

WINDOW OBJECT METHOD


Methods Description

innerWidth, Read/write property that specifies the width and height, in pixels, of the window's content
innerHeight area respectively. Does not include the toolbar, scrollbars etc. NS/Firefox exclusive
properties.

Note: IE equivalents are "document.body.clientWidth" and "document.body.clientHeight"


length Returns the number of frames contained in the window.

outerWidth, Read/write property that specifies the total width and height, in pixels, of the window's
outerHeight content area respectively, including any toolbar, scrollbars etc. NS/Firefox exclusive
properties with no IE4+ equivalent.

pageXOffset, Returns an integer representing the pixels the current document has been scrolled from the
pageYOffset upper left corner of the window, horizontally and vertically, respectively. Typically used to
provide the needed calculations to keep an element in view even when the page is scrolled.
NS/Firefox exclusive properties.

Note: IE equivalents are "document.body.scrollLeft" and "document.body.scrollTop"


window.screen References the screen object, which provides information about the user's screen/ monitor.

screen.availWidth Returns the height of the screen, in pixels, minus interface features such as the taskbar in
Windows. In other words, the usable height available to your browser window.

screen.availHeight Returns the width of the screen, in pixels, minus interface features such as the taskbar in
Windows. In other words, the usable width available to your browser window.

screen.colorDepth The bit depth of the color palette available for displaying images in bits per pixel.

screen.height The total height of the screen, in pixels.

Prepared By: Ms. Ircelle Tolentino Galven 


AMA Education Systems
27
screen.pixelDepth Display screen color resolution (bits per pixel). NS/Firefox exclusive property.

screen.width The total width of the screen, in pixels.

screenX, screenY Read/write property that specifies the x and y coordinates of the window relative to the
user's monitor screen. NS/Firefox exclusive properties.

screenLeft, screenTop Specifies the x and y coordinates of the window relative to the user's monitor screen. IE
only.

scrollX, scrollY Returns an integer representing the pixels the current document has been scrolled from the
upper left corner of the window, horizontally and vertically, respectively. NS/Firefox
exclusive properties. Equivalent to pageXOffset and pageYOffset, and in IE,
"document.body.scrollLeft" and "document.body.scrollTop"

JAVASCRIPT WINDOW OBJECT

The JavaScript window object sits at the top of the JavaScript Object hierarchy and represents the browser window (or
windows if you have more than one browser window open at any one time). Up until this chapter we have focused on the
internals and syntax of JavaScript. In this chapter we will begin to make things happen on the screen (which, after all, is
one of the main purposes of JavaScript). The window object allows developers to perform tasks such as opening and
closing browser windows, displaying alert and prompt dialogs and set up timeouts (specifying an action to take place after
a specified period of time).

Referencing the JavaScript window Object

As covered in JavaScript Object Basics it is usually necessary to use dot-notation when accessing properties or methods of
an object. For example the following script fragment accesses the write() method of the document object:

document.write("Hello");

The window object is the top-level object of the object hierarchy. As such, whenever an object method or property is
referenced in a script without the object name and dot prefix it is assumed by JavaScript to be a member of the window
object. This means, for example, that when calling the window alert() method to display an alert dialog the window.
prefix is not mandatory. Therefore the following method calls achieve the same thing:

window.alert();
alert()

JavaScript window Object Properties

The JavaScript window object contains a number of properties that can be inspected and used in a script:

 window.closed - Used when handling multiple windows, this property indicates whether a window has been closed or
not.

Prepared By: Ms. Ircelle Tolentino Galven 


AMA Education Systems
28
 window.defaultstatus / window.status - defaultstatus specifies the default message displayed in the browser status bar.
status specifies a temporary message to display in the browser status bar in place of the default. Disabled in many
browsers.

 window.frames[] - If the window contains frames this array holds the arrary of frame objects (see JavaScript Arrays
details on accessing arrays).

 window.name - Windows opened by a script must be given a name. This property contains the name of the
corresponding window object.

 window.opener - When a window has been opened in a script contained in another window, this property of the child
window contains a reference window which opened it.

 window.parent - When working with frames in a window this property contains a reference to the window object that
contains the frame.

 window.screen - An object which contains information about the screen on which the window is displays (properties
contained in this object include height, width, availHeight, availWidth and colorDepth).

 window.self - A reference to the current window.

 window.top - A reference to the top-level window when working with frames.

Opening Browser Windows using JavaScript

A new browser window can be opened from a JavaScript script using the open() method of the window object. The syntax
for opening a new window is as follows:

newWindowObj = window.open("URL", "WindowName", "feature, feature, feature ... ");

The following provides an explanation of the arguments passed through to the open() method:

 URL - Specifies the URL of the web page to be loaded into the new window. If no URL is specified a blank window is
loaded.

 WindowName - Specifies the window name and is used to refer to the window.

 features - A comma separated list of features that allow you to customize the appearance of the window. Options are:

Setting Explanation
width Specifies the intial width of the browser client window (see innerWidth for size of content area)
height Specifies the intial height of the browser client window (see innerHeight for size of content area)
innerWidth Specifies the intial width of the window content area
innerHeight Specifies the intial height of the window content area

Prepared By: Ms. Ircelle Tolentino Galven 


AMA Education Systems
29
outerWidth Specifies the intial width of the navigator window
outerHeight Specifies the intial height of the navigator window
toolbar Specifies whether the window should contain the browser toolbar or not
status Specifies whether the window should contain the browser status bar or not
dependent Specifies whether the window should close in unison with its parent window
menubar Specifies whether the window should contain the browser menubar
location Specifies whether the window should contain the browser location/URL box
scrollbars Hides/Shows browser horizontal/vertical scrollbars
resizable Specifies whether the user is entitled to resize the window after it appears.
directories Specifies whether the window should contain the browser personal toolbar.
Specifies whether the new window should contain a copy of the URL history of the invoking
copyHistory
window
left Specified the number of pixels from the left side of the screen to the new window
top Specified the number of pixels from the top of the screen to the new window
Creates a new window that is always positioned beneath the other browser windows. Often used
alwaysLowered
for those annoying pop-under advertisements.
Creates a new window that is always positioned over the top of the other browser windows on the
alwaysRaised
screen.
z-lock Locks the level at which the browser appears in relation to other browser windows.

The height, width and postion feature are set using numbers. The remaining feature options can be set using true or false
values (also yes, no and 1 and 0 can be used in place of true and false). An absent attribute is considered to be false. The
following example creates a new window with a menubar, specific dimension and no toolbar:

newWindowObj = window.open("URL", "WindowName", "toolbar=0, menubar=1, innerHeight=200, innerWidth=300");

Closing Browser Windows using JavaScript

A window can be closed using the window object's close() method. The name of the window (specified in the open()
method should be referenced when performing a close so that you are certain to close the correct window. For example
the following code creates a new window and creates a pushbutton which, when clicked, closes the new window:

<script language="JavaScript" type="text/javascript">

newWindowObj = window.open ("", "MyWindow");

</script>

<form action="null">
<input type="button" value="Close Window" onclick="newWindowObj.close()" />
</form>

It is also possible to close the window that opened the current window using the opener property of the current window
object:

Prepared By: Ms. Ircelle Tolentino Galven 


AMA Education Systems
30
window.opener.close()

will close the window that opened the window in which the above script is run.

Moving and Resizing Windows

A window can be moved to specific coordinates on the screen using the window object's moveTo() method which takes x
and y coordinates as arguments. The following example move a new window to location 100, 200 on the screen when the
"Move Window" button is pressed:

<script language="JavaScript" type="text/javascript">


newWindowObj = window.open ("", "MyWindow");

</script>

<form action="null">
<input type="button" value="Move Window" onclick="newWindowObj.moveTo(100, 200)" />
</form>

In addition to moving a window to a specific new location is is also possible to move a window relative to its current
location on the screen using the moveBy() method of the JavaScript window object. Once again the method takes x and y
values that are added to the current x and y coordinates of the specified window. Negative values can be used to change
the direction of the movement:

<script language="JavaScript" type="text/javascript">


newWindowObj = window.open ("", "MyWindow");

</script>

<form action="null">
<input type="button" value="Move Window" onclick="newWindowObj.moveTo(100, 200)" />
</form>

The window resizeTo() and resizeBy() methods work similarly in that they allow you to change the size of a window
either to a specific size, or to a new size relative to the current size.

Changing Window Focus

When a window is the currently selected window on the screen it is said to have focus. Typically, clicking with the mouse
pointer in a window gives that window focus. With JavaScript it is possible to programmitically change the focus of a
window using the focus() and blur() methods. The following example displays a new window, blurs it so that the opening
window still has focus and provides a button to switch focus to the new window:

<script language="JavaScript" type="text/javascript">

newWindowObj = window.open ("", "MyWindow");


newWindowObj.blur();

Prepared By: Ms. Ircelle Tolentino Galven 


AMA Education Systems
31
</script>

<form action="null">
<input type="button" value="Focus New Window" onclick="newWindowObj.focus()" />
</form>

Displaying Message Box Dialogs

The JavaScript window object provides methods to display three types of message dialogs, the alert, confirmation and
prompt dialogs:

 alert - intended to display a message to the user. It contains a message area where the alert message is to be displayed
and an "OK" button that the user can click to dismiss the dialog. The alert() method takes a single argument representing
the message to be displayed in the dialog. The following web page fragment displays an alert dialog with the message
"You do not have a valid password" when the "Show Alert" button is clicked:

<form action="null">
<input type="button" value="Show Alert" onclick="window.alert('You do not have a valid password')" />
</form>
 confirmation - used when a yes or no response needs to be obtained from the user. This dialog type displays with a
message and "OK" and "Cancel" buttons. The confirm() method takes the message to be displayed to the user as an
argument and retruns true or false depending on whether the user pressed "OK" or "Cancel":

<script language="JavaScript" type="text/javascript">

function showConfirmation()
{
var result = confirm("Would you like to continue?");

if (result)
document.write("Continue");
else
document.write("Do not continue");
}
</script>

<form action="null">
<input type="button" value="Show Confirmation" onclick="showConfirmation()" />
</form>

 prompt - designed to enable information to be obtained from the user. The dialog conists of a message to the user, a
text input field for the entry of data and OK and Cancel buttons. The prompt() method takes the message to be displayed
as an argument and retruns the value entered by the user:

<script language="JavaScript" type="text/javascript">

function showPrompt()
{
var userInput = prompt("Please enter your name:");

document.write("Hello, " + userInput);


}

Prepared By: Ms. Ircelle Tolentino Galven 


AMA Education Systems
32
</script>

<form action="null">
<input type="button" value="Show Prompt" onclick="showPrompt()" />
</form>

ARRAY IN JAVASCRIPT

Arrays are a fundamental part of most programming languages and scripts. Arrays are simply an ordered stack of data
items. Each element of the array can store its own data, just like a variable, thus you can say arrays are collections of
variables. Items can be added and removed from the array at any time, also their value can be changed easily. One other
feature of the arrays, which is specific to JavaScript is that the elements in the array can be of different types. For example
in an array you can have both a string and an integer.

Using arrays, you can store multiple values under a single name. Instead of using a separate variable for each item, you
can use one array to hold all of them.

 Creating Arrays
 Associative Arrays

 Multidimensional Arrays

Creating Arrays

There are a few different ways to create an array. The old way of creating arrays to involve the Array() constructor.
JavaScript arrays are dynamic, so you can declare an array and do not pass any arguments with the Array() constructor. In
this case you will create an empty array with no elements.

<script type="text/javascript">

//We initialize the array using the array() constructor.


var first_array = new Array();

first_array[0] = "This is an element";


first_array[1] = 5;
first_array[2] = "JavaScript - Tutorial";
first_array[3] = 16;
first_array[4] = 7;

var counter=0;

//Let's print out the elements of the array.


for (counter=0; counter<first_array.length; counter++)
   document.write(first_array[counter] + "<br>");

</script>

To declare an array with the specified number of elements you should pass a single integer as an argument. If you pass
more than one argument then the number of elements will be equal to the number of data values specified. If you specify
numbers or true/false values inside the array then the type of variables will be numeric or Boolean instead of string.
Array's elements are accessed using their index, which starts from 0.

Prepared By: Ms. Ircelle Tolentino Galven 


AMA Education Systems
33
<script type="text/javascript">

//We declare the first array and pass a single integer as an argument..


var cars = new Array(5);

cars[0] = "Audi";
cars[1] = "Bentley";
cars[2] = "Mercedes";
cars[3] = "Mini";
cars[4] = "BMW";

//Now we declare the second array and pass 8 arguments.


//This technique does not work in JavaScript 1.2.
var flowers = new Array("Rose", 2.45, "Daisy", 1.57, "Orchild", 0.75, "Tulip", 1.15);

var counter=0;
document.write("<h1>Elements of the first array:</h1>");

for (counter=0; counter<cars.length; counter++)


   document.write(cars[counter] + "<br>");

counter=0;
document.write("<h1>Elements of the second array:</h1>");

for (counter=0; counter<flowers.length; counter++) {

   if (counter % 2 == 0) {
      document.write(flowers[counter] + " costs ");
   }
   else {
      document.write(flowers[counter] + "<br>");
   }

</script>

Back to top

Associative Arrays

Associative arrays are arrays that allow you to call the array element you need using a string rather than a number, which
is often easier to remember. The downside is that these aren't as useful in a loop because they do not use numbers as the
index value. Have a look at the following example:

<script type="text/javascript">

var first_array = new Array();


first_array["key1"] = "the first element";
first_array["key2"] = "the second element";

Prepared By: Ms. Ircelle Tolentino Galven 


AMA Education Systems
34
var second_array  = new Array();
second_array["key3"] = "this is the first element of the second array";
second_array["key4"] = "this is the second element of the second array";

document.write(first_array["key1"] + "<br>");   //prints "the first element."


document.write(second_array["key3"] + "<br>");  //prints "the first element of the second array"
document.write(first_array["key2"] + "<br>");   //prints "the second element"
document.write(second_array["key4"] + "<br>");  //prints "this is the second element of the second array"

</script>

Because the indices in this associative array are not numbers, we cannot use a simple counter in a for loop to work with
the array. The way to iterate over the items in an associate array is to use the for (value in array) construct, allowing you
to access each item's value via array[value]. Have a look at the example:

<script type="text/javascript">

//We initialize the array using the Array() constructor. 


//Note that for readability one can spread the argument over several lines.
var flower_shop = new Array ();

flower_shop["rose"] = "5.00";
flower_shop["daisy"] = "4.00";
flower_shop["orchid"] = "2.00";

//let's print out the headers to our table


document.write("<table border=\"1\" cellpadding=\"5\">");
document.write("<tr><th>Flower</th><th>Price</th></tr>");

//Now we start the for loop using the variable flower to hold our key.
for ( var flower in flower_shop) //print the values into a table cell for each iteration
  document.write( "<tr><td>" + flower + "</td><td>" + flower_shop[flower] + "</td></tr>");

//finally close the table


document.write ("</table>");

</script>

Back to top

Multidimensional Arrays

In the preceding examples you've learned how to use arrays. But what if you want to give more information on each
flower? You now have the cost, but what if you wanted to add the number of flowers you get for that price, and the colour
of the flower? One of the ways to do it is using multidimensional arrays.

A multidimensional array is an array that contains at least one other array as the value of one of the indexes. Example
below shows how to use multidimensional array:

Prepared By: Ms. Ircelle Tolentino Galven 


AMA Education Systems
35
<script type="text/javascript">

//Initialize the array using the Array() constructor.


var flower_shop = new Array();

flower_shop['rose'] = new Array( "5.00", "7 items", "red" );


flower_shop['daisy'] = new Array( "4.00", "3 items", "blue" );
flower_shop['orchild'] = new Array( "2.00", "1 item", "white" );

//print "rose costs 5.00, and you get 2 items."


document.write( "rose costs " + flower_shop['rose'][0] + ", and you get " + flower_shop['rose'][1] + ".<br>");
//print "daisy costs 4.00, and you get 3 items." 
document.write( "daisy costs " + flower_shop['daisy'][0] + ", and you get " + flower_shop['daisy'][1] + ".<br>");
//print "orchild costs 2.00, and you get 1 item. 
document.write( "orchild costs " + flower_shop['orchild'][0] + ", and you get " + flower_shop['orchild'][1] + ".<br>");

</script>

JAVASCRIPT FORM OBJECT

Form object is a Browser object of JavaScript used to access an HTML form. If a user wants to access all forms within a
document then he can use the forms array. The form object is actually a property of document object that is uniquely
created by the browser for each form present in a document. The properties and methods associated with form object are
used to access the form fields, attributes and controls associated with forms.

Properties of Form Object:


 action  FileUpload
 elements[]
 hidden
 encoding
 password
 length
 radio
 method
 reset
 name
 select
 target
 submit
 button
 text
 checkbox
 textarea

Prepared By: Ms. Ircelle Tolentino Galven 


AMA Education Systems
36
action:
action property of form object is used to access the action attribute present in HTML associated with the <form> tag. This
property is a read or write property and its value is a string.

elements[]:
elements property of form object is an array used to access any element of the form. It contains all fields and controls present
in the form. The user can access any element associated with the form by using the looping concept on the elements array.

encoding:
The encoding property of a form object is used to access the enctype attribute present in HTML associated with the <form>
tag. This property is a read or write property and its value is a string. This property helps determine the way of encoding the
form data.

length:
length property of form object is used to specify the number of elements in the form. This denotes the length of the elements
array associated with the form.
method:
method property of form object is used to access the method attribute present in HTML associated with the <form> tag. This
property is a read or write property and its value is a string. This property helps determine the method by which the form is
submitted.

name:
name property of form object denotes the form name.

target:
target property of form object is used to access the target attribute present in HTML associated with the <form> tag. This
property denotes the name of the target window to which form it is to be submitted into.

button:
The button property of form object denotes the button GUI control placed in the form.
checkbox:
checkbox property of form object denotes the checkbox field placed in the form.

FileUpload:
FileUpload property of form object denotes the file upload field placed in the form..

hidden:
The hidden property of form object denotes the hidden field placed in the form.

password:
password property of form object denotes the object that is placed as a password field in the form.

radio:
radio property of form object denotes the radio button field placed in the form.

reset:
As the name implies, the reset property of form object denotes the object placed as reset button in the form.

select:
select property of form object denotes the selection list object placed in the form.

submit:
submit property of form object denotes the submit button field that is placed in the form.

text:
text property of form object denotes the text field placed in the form.

textarea:
textarea property of form object denotes the text area field placed in the form.

An example to understand the above explanations in detail:


<FORM NAME="exforsys" ACTION="" METHOD="GET">
Input Values:<BR>
<INPUT TYPE="text" NAME="test" VALUE=""><P>
<INPUT TYPE="button" NAME="example" VALUE="Click" onClick="testfunc(this.form)">
</FORM>

Here the FORM NAME="exforsys" creates and denotes the name of the form. The user can refer to the form in his or her
code of JavaScript by the name exforsys. The form name given must follow the naming conventions or rules of JavaScript's
variable or function naming rules. The next word, ACTION="" tells the way the user wants the browser to handle the form
when it is submitted to a CGI program running on the server. It can also be left as not specified with any of the above
properties. This means the URL for the CGI program is then omitted.

The METHOD="GET" defines that the method data is passed to the server when the form is submitted.

INPUT TYPE="text" defines the object used as a text box with the name of the text box as a test with no initial value
specified. INPUT TYPE="button" defines the object used as a button with the name of the button object as an example. The
value is specified as Click and when the button is clicked, the onClick event handler fires and the function associated with it
(testfunc(this.form)) is called.

Methods of form object:


 reset()
 submit()

 handleEvent()

reset():
reset() method of form object is used to reset a form.

submit():
submit() method of form object is used to submit a form.

handleEvent():
handleEvent() method of form object is used to start or invoke a form's event handler for a specified event.

JAVASCRIPT LOCATION OBJECT

The JavaScript Location object is a child object of the Window Object and is used to store information about the current
URL of the Window object.

Loading a New URL into the Current Window

The location object contains a number of methods and properties that enable the JavaScript developer to manipluate the
current URL of a window. A commom example is to progammatically change the current window URL. This can be done
by assigning a new URL string to the href property of the Location option:

window.location.href="http://www.techotopia.com";

Reading the URL of the Current Window

It is also possible to read the URL of the current document. The simplest form of this is to access the href property of the
Location object of the current window:

var currentURL=window.location.href;

Extracting Parts of the URL


It is also possible to access the various components that go to make up a complete URL. Suppose, for example, that the
current URL is:

http://www.techotopia.com:80/order.cgi?batch=1#intro

the following properties represent the various elements of the URL:

 location.protocol - the protocol section of the URL (for example http: or https:)
 location.hostname - the hostname (for example www.techotopia.com)
 location.port - the HTTP Port number of the URL (for example 80)
 location.search - the search portion of the URL (batch=1 in the example above)
 location.hash - the anchor name in the URL (#intro in our example)

JavaScript Location Object Methods

The JavaScript Location Object contains two methods that may be invoked from JavaScript.
These are:

 location.reload() - reloads the current document. The same as pressing the Reload button in the browser window. If
true is passed through as an argument (i.e location.reload(true)) it forces a reload without using the browser cache (similar
to shift clicking on the browser Reload button.
 location.replace() - replaces the current URL with the new URL specified as an argument (i.e
location.replace("http://www.techotopia.com"). Change does not get recorded to the browser's history (see JavaScript
History Object).

Properties
Properties Description

hash Specifies the anchor portion of the URL, including the leading hash. (ie: "#section2").

host Specifies the hostname and port (if available) of a URL. (ie: "www.mysite.com" or
"www.mysite.com:563").

hostname Specifies the hostname portion of the URL (ie: "www.mysite.com").

href Specifies the entire URL.

pathname Specifies the path name of the URL (ie: "/good.htm").

port Specifies the port portion of the URL (ie: "563" within the host
"www.mysite.com:563").

protocol Specifies the protocol portion of the URL, including the trailing colon (ie: "http:" or
"https:").

search Specifies the query portion of the URL, including the question mark (ie: "?
sort=alpha")

Methods Note: "[]" surrounding a parameter below means the parameter is optional.
Methods Description
reload([forceGet]) Reloads the current document. If "forceGet" set to true, document is completely
reloaded even if server reports it hasn't been modified since last reload. Default is
false.

replace(url) Loads the specified URL over the current history entry. Example(s)

You might also like