Unit Notes. ICAWEB411A Produce basic client-side script for dynamic web pages Topic 1 Introduction to JavaScript

Size: px
Start display at page:

Download "Unit Notes. ICAWEB411A Produce basic client-side script for dynamic web pages Topic 1 Introduction to JavaScript"

Transcription

1 Unit Notes ICAWEB411A Produce basic client-side script for dynamic web pages Topic 1 Introduction to JavaScript

2 Copyright, 2013 by TAFE NSW - North Coast Institute Date last saved: 18 September 2013 by Stephen Hillenbrand Version: 2.0 # of Pages = 14 Copyright of this material is reserved to the Crown in the right of the State of New South Wales. Reproduction or transmittal in whole, or in part, other than in accordance with the provisions of the Copyright Act, is prohibited without written authority of TAFE NSW - North Coast Institute. Disclaimer: In compiling the information contained within, and accessed through, this document ("Information") DET has used its best endeavours to ensure that the Information is correct and current at the time of publication but takes no responsibility for any error, omission or defect therein. To the extent permitted by law, DET and its employees, agents and consultants exclude all liability for any loss or damage (including indirect, special or consequential loss or damage) arising from the use of, or reliance on, the Information whether or not caused by any negligent act or omission. If any law prohibits the exclusion of such liability, DET limits its liability to the extent permitted by law, to the re-supply of the Information. Third party sites/links disclaimer: This document may contain website links to third party sites. DET is not responsible for the condition or the content of those sites as they are not under DET's control. The link(s) are provided solely for your convenience and do not indicate, expressly or impliedly, any endorsement of the site(s) or the products or services provided there. You access those sites and use their products and services solely at your own risk. Page 2 of 14

3 Table of Contents Getting Started... 4 Topic 1 - Introduction to JavaScript My first JavaScript program Variables Input forms Functions Objects and Dot Notation Page 3 of 14

4 Getting Started Plain HTML web pages are not very interactive: they merely present information to the user. JavaScript can be added to web pages to allow users to interact with pages, for example, the calculator at This unit introduces client-side scripting with JavaScript to add dynamic functionality to web pages. It is advisable that you have completed "Create Markup Document" or are knowledgeable in HTML before attempting this unit. NOTE: These unit notes should not constitute your only learning resource. Make sure that you make use of other resources to assist in your learning. is one such resource. Search for others on the Internet or visit the library. Using the Unit Notes Icons and symbols are used throughout the guide to provide quick visual references. They indicate the following: Icon Meaning Icon Meaning ACTIVITY: An activity is listed to be completed ACTIVITY: A Learning activity requiring some physical action WWW: A web link is listed IMPORTANT: A pivotal point is detailed REFLECTION: A point is to be considered and thought about more deeply SEARCH: A particular item / book etc needs to be found and applied Page 4 of 14

5 Topic 1 - Introduction to JavaScript My first JavaScript program 1. Create a new web page document using notepad or a web authoring tool such as Dreamweaver. Make sure that the document contains the HTML skeleton code. Dreamweaver creates this automatically. 2. Add the opening and closing script tag shown on lines 8 and 14 respectfully in Script 1 below. In this case, make sure that it goes in the body section of the web document. Content within these tags will be interpreted by the browser as JavaScript. [NOTE: Magnify Word if you have trouble reading the script] 3. Add the <!-- and --> on lines 9 and 13 respectfully. These are HTML comments. They hide the JavaScript code from the browsers that do not support JavaScript otherwise the code will be printed out. 4. Between those comment tags, add the JavaScript on line Save the document as a web page. 6. Locate the file and double click on it 7. You should see the words "Hello World" printed to the screen. 8. Congratulations - you have written you first JavaScript web page. Script 1 - My first JavaScript script <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " <html xmlns=" <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>my First Java Script Page</title> </head> <body> <script type="text/javascript"> document.write("hello World"); </script> </body> </html> Code comments document.write("hello World") is an instruction. It instructs the browser to print out what's in the brackets, that being, "Hello World". The ";" means end of instruction. A JavaScript program usually comprises of many instructions each ending with a ";". Page 5 of 14

6 1.2 - Variables In Script 1 the "Hello World" is printed out as a string literal. The "Hello World" can also be stored in a variable first before being printed out. What is a variable? When we bake a cake we store the cake s ingredients in bowls, e.g., a bowl of apples, a bowl of eggs. Program variables are like these bowls. They provide a place to store data until the program needs to use the data. Creating a variable in JavaScript is easy. For example, fruit = "apple"; stores the string "apple" in the variable fruit, and number = 5; stores the number 5 in the variable number You can also write var fruit = "apple"; and var number = 5; where var stands for variable but it's optional. Page 6 of 14

7 Script 2 - using variables <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " <html xmlns=" <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>my First Java Script Page</title> </head> <body> <script type="text/javascript"> str = "Hello World"; document.write(str); </script> </body> </html> In the code in Script 2, str is a variable. The code str = "Hello World"; stores the string Hello World in the variable str. The code document.write (str); prints what's contained in the variable str onto the webpage. Notice that str does not go in quotes as it's a variable that contains a string, not the string itself! document.write (str) is a command. It tells the browser to print out what's in the variable str to the web page. Page 7 of 14

8 Script 3 - Concatenating strings. In the code below, the strings Hello and World are stored in separate variables. Strings are always wrapped in quotes. They are then joined together (concatenated) before being printed out with the + symbol. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " <html xmlns=" <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>variables</title> </head> <body> <script type="text/javascript"> str1 = "Hello"; str2 = "World"; document.write(str1 + " " + str2); </script> </body> </html> Script 4 - printing out a number <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " <html xmlns=" <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>variables</title> </head> <body> <script type="text/javascript"> num = 9; document.write(num); </script> </body> </html> In the above code the number 9 is stored in the variable num and then printed out. Page 8 of 14

9 Script 5 - Printing out the sum of two numbers <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " <html xmlns=" <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>variables</title> </head> <body> <script type="text/javascript"> num1 = 3; num2 = 6; document.write(num1 + num2); </script> </body> </html> Here, the numbers 3 and 6 are stored in the variables num1 and num2 respectfully and then their sum printed out. Numbers are not wrapped in quotes. Whether the + operator will be used to concatenate or add depends on the context. If the operands are strings, concatenation is assumed, else, if they are numbers, addition is assumed. If you wish to concatenate numbers then they must be wrapped in quotes so that they are interpreted as strings. Script 6 - Concatenating numbers and strings together <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " <html xmlns=" <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>variables</title> </head> <body> <script type="text/javascript"> num1 = 3; num2 = 6; sum = num1 + num2; document.write(num1 + " + " + num2 + " = " + sum); </script> </body> </html> What is happening in Script 6? Try it! Page 9 of 14

10 1.3 - Input forms Up to this point, you have hardcoded the input values into the code. Generally, the input is supplied by the user via a user interface. A form is a common example of such an interface. Let s create a simple calculator to illustrate STEP 1 Create the HTML form using the HTML code shown in Script 7. Knowledge of HTML is assumed. Script 7 - HTML form <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso "> <title>add two numbers</title> </head> <body> <form id="form1" name="form1" method="post" action=""> <p> <label for="num1"></label> Number 1: <input type="text" name="num1" id="num1" /> </p> <p> <label for="num2"></label> Number 2: <input type="text" name="num2" id="num2" /> </p> <p> <label for="add"></label> <input type="button" name="add" id="add" value="add" /> </p> </form> </body> </html> The Number 1 and Number 2 input field will allow the user to supply two numbers to add up upon clicking the Add button. Page 10 of 14

11 STEP 2 Now, in the head section, add the code shown in Script 8: Script 8 - JavaScript to add two numbers together <script type="text/javascript"> function myaddfunction(num1, num2) { } </script> num1 = parseint(num1); num2 = parseint(num2); sum = num1 + num2; alert(num1 + " + " + num2 +" = " + sum); STEP 3 In the button tag add an onclick event as show in the code below. <p> <label for="add"></label> <input type="button" name="add" id="add" value="add" onclick="javascript: myaddfunction(this.form.num1.value, this.form.num2.value);"/> </p> STEP 4 Load the page and try the script. If it doesn t work, look for any coding errors. Two new constructs have been introduced in the code above: Functions and dot notation Functions Functions are simply containers containing code. When a function is called, the code in the function is run. For example: function paint_wall(room, colour) { Go to hardware store Buy paint with the colour ***specified in the brackets above*** Return back home to the room ***specified in the brackets above*** Open tin of paint Get paint brush and dip into paint Page 11 of 14

12 and so on... } Every time the function paint_garage_wall("garage", "green") is called, the garage will be painted green. What would happen if the function is called? paint_garage_wall("kitchen", "brown") Code comments On the line function myaddfunction(num1, num2) we have defined a userdefined function. It encapsulates the code between the opening and closing curly braces { }. Look at the button tag of the form. Notice the inclusion of the "onclick" event. Whenever the "Add" button is clicked, the event myaddfunction(this.form.num1.value, this.form.num2.value) is fired. This calls the function "myaddfunction(num1, num2)" passing the value "this.form.num1.value" and "this.form.num2.value" into "num1" and "num2" of the function respectfully. The code in the function is now run. "this.form.num1.value" is the value supplied in the first textbox in the form. "this.form.num2.value" is the value supplied in the second textbox in the form. We'll look at the dot notation shortly. num1 and num2 is cast as a number with the built-in function parseint(). It typecasts num1 and num2 as numbers. This is necessary as form content is always interpreted as strings. Next the two numbers are added together and stored in the variable sum The built-in "alert()" function is then called. This pops up an alert box containing the sum. Upon closing the alert box, the function exits. Page 12 of 14

13 1.5 Objects and Dot Notation JavaScript code is an object-oriented language. In JavaScript, the world is broken up into things (objects). These objects are contained in other things much like a kitchen (an object) is contained in a house, also an object. Objects comprise of two parts: properties and methods. Properties store the characteristics of an object, e.g., wall colour of the kitchen is green. Methods allow the programmer to do something to the object e.g., turn the lights in the kitchen on. Look at the following diagram. To switch on the lights in the garage use dot notation as follows: House.Garage.turnLightsOn() How would you get the wall colour of the bedroom? How would paint the kitchen blue? So, back to our calculator, the "this.form.num1.value" should now make more sense: "this" is the button object itself. "form" is a pointer to the form object that contains the button. "num1" is a pointer to the first textbox object in the form that contains the first number to be added. Page 13 of 14

14 "value" is a property of the first textbox object in the form that contains the textbox's assigned value. Other example uses: To change the web page's background colour red, type in document.body.style.background = 'red'; To change the colour of a table row blue, type in document.getelementbyid('mytable').style.backgroundcolor = 'blue'; How would you colour in the row of a table? Page 14 of 14

Unit Notes. ICAWEB501A Build a dynamic website Topic 4 Test web application

Unit Notes. ICAWEB501A Build a dynamic website Topic 4 Test web application Unit Notes ICAWEB501A Build a dynamic website Topic 4 Test web application Copyright, 2014 by TAFE NSW - North Coast Institute Date last saved: 10 March 2014 by Amanda Walker Version: 1.0 # of Pages =

More information

Unit Notes. ICAICT302A Install and optimise operating system software Topic 3 Install, configure and optimise an operating system

Unit Notes. ICAICT302A Install and optimise operating system software Topic 3 Install, configure and optimise an operating system Unit Notes ICAICT302A Install and optimise operating system software Topic 3 Install, configure and optimise an operating system Copyright, 2012 by TAFE NSW - North Coast Institute Date last saved: 31

More information

Web Development & Design Foundations with XHTML. Chapter 2 Key Concepts

Web Development & Design Foundations with XHTML. Chapter 2 Key Concepts Web Development & Design Foundations with XHTML Chapter 2 Key Concepts Learning Outcomes In this chapter, you will learn about: XHTML syntax, tags, and document type definitions The anatomy of a web page

More information

Introduction to HTML5

Introduction to HTML5 Introduction to HTML5 History of HTML 1991 HTML first published 1995 1997 1999 2000 HTML 2.0 HTML 3.2 HTML 4.01 XHTML 1.0 After HTML 4.01 was released, focus shifted to XHTML and its stricter standards.

More information

Implementing a chat button on TECHNICAL PAPER

Implementing a chat button on TECHNICAL PAPER Implementing a chat button on TECHNICAL PAPER Contents 1 Adding a Live Guide chat button to your Facebook page... 3 1.1 Make the chat button code accessible from your web server... 3 1.2 Create a Facebook

More information

Unit Notes. ICASAS301A Run standard diagnostic tests Topic 1

Unit Notes. ICASAS301A Run standard diagnostic tests Topic 1 Unit Notes Topic 1 Copyright, 2015 by TAFE NSW - North Coast Institute Date last saved: 2 February 2015 by Tracy Norris Version: 1.1 # of Pages = 24 Copyright of this material is reserved to the Crown

More information

ICTWEB424 Evaluate and select a web hosting service

ICTWEB424 Evaluate and select a web hosting service ICTWEB424 Evaluate and select a web hosting service Learner Guide Copyright, 2015 by North Coast Date last saved: 13 October 2015 by Sharon Lehman Version: 1 # of Pages = 22 ICT team Content writer and

More information

HTML Overview. With an emphasis on XHTML

HTML Overview. With an emphasis on XHTML HTML Overview With an emphasis on XHTML What is HTML? Stands for HyperText Markup Language A client-side technology (i.e. runs on a user s computer) HTML has a specific set of tags that allow: the structure

More information

Javascript. UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall 2010

Javascript. UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall 2010 Lecture 14 Javascript Announcements Project #2 New website Exam#2 No. Class Date Subject and Handout(s) 17 11/4/10 Examination Review Practice Exam PDF 18 11/9/10 Search, Safety, Security Slides PDF UMass

More information

What is XHTML? XHTML is the language used to create and organize a web page:

What is XHTML? XHTML is the language used to create and organize a web page: XHTML Basics What is XHTML? XHTML is the language used to create and organize a web page: XHTML is newer than, but built upon, the original HTML (HyperText Markup Language) platform. XHTML has stricter

More information

Place User-Defined Functions in the HEAD Section

Place User-Defined Functions in the HEAD Section JavaScript Functions Notes (Modified from: w3schools.com) A function is a block of code that will be executed when "someone" calls it. In JavaScript, we can define our own functions, called user-defined

More information

c122mar413.notebook March 06, 2013

c122mar413.notebook March 06, 2013 These are the programs I am going to cover today. 1 2 Javascript is embedded in HTML. The document.write() will write the literal Hello World! to the web page document. Then the alert() puts out a pop

More information

Documents and computation. Introduction to JavaScript. JavaScript vs. Java Applet. Myths. JavaScript. Standard

Documents and computation. Introduction to JavaScript. JavaScript vs. Java Applet. Myths. JavaScript. Standard Introduction to Prof. Ing. Andrea Omicini II Facoltà di Ingegneria, Cesena Alma Mater Studiorum, Università di Bologna andrea.omicini@unibo.it Documents and computation HTML Language for the description

More information

TRAINING GUIDE. Rebranding Lucity Web

TRAINING GUIDE. Rebranding Lucity Web TRAINING GUIDE Rebranding Lucity Web Rebranding Lucity Web Applications In this booklet, we ll show how to make the Lucity web applications your own by matching your agency s style. Table of Contents Web

More information

Using an ArcGIS Server.Net version 10

Using an ArcGIS Server.Net version 10 Using an ArcGIS Server.Net version 10 Created by Vince DiNoto Vince.dinoto@kctcs.edu Contents Concept... 2 Prerequisites... 2 Data... 2 Process... 3 Creating a Service... 3 Down Loading Shapefiles... 3

More information

function < name > ( < parameter list > ) { < statements >

function < name > ( < parameter list > ) { < statements > Readings and References Functions INFO/CSE 100, Autumn 2004 Fluency in Information Technology http://www.cs.washington.edu/100 Reading» Fluency with Information Technology Chapter 20, Abstraction and Functions

More information

More cool scripts: Slide Show: What the settimeout() function does:

More cool scripts: Slide Show: What the settimeout() function does: More cool scripts: Slide Show: So far the user has controlled the action. However, you can make a slide show that automatically cycles through each image in an array and goes to the next image at an incremental

More information

Enhancing Web Pages with JavaScript

Enhancing Web Pages with JavaScript Enhancing Web Pages with JavaScript Introduction In this Tour we will cover: o The basic concepts of programming o How those concepts are translated into JavaScript o How JavaScript can be used to enhance

More information

MI1004 Script programming and internet applications

MI1004 Script programming and internet applications MI1004 Script programming and internet applications Course content and details Learn > Course information > Course plan Learning goals, grades and content on a brief level Learn > Course material Study

More information

CS1046 Lab 4. Timing: This lab should take you 85 to 130 minutes. Objectives: By the end of this lab you should be able to:

CS1046 Lab 4. Timing: This lab should take you 85 to 130 minutes. Objectives: By the end of this lab you should be able to: CS1046 Lab 4 Timing: This lab should take you 85 to 130 minutes. Objectives: By the end of this lab you should be able to: Define the terms: function, calling and user-defined function and predefined function

More information

Using htmlarea & a Database to Maintain Content on a Website

Using htmlarea & a Database to Maintain Content on a Website Using htmlarea & a Database to Maintain Content on a Website by Peter Lavin December 30, 2003 Overview If you wish to develop a website that others can contribute to one option is to have text files sent

More information

Create a cool image gallery using CSS visibility and positioning property

Create a cool image gallery using CSS visibility and positioning property GRC 275 A8 Create a cool image gallery using CSS visibility and positioning property 1. Create a cool image gallery, having thumbnails which when moused over display larger images 2. Gallery must provide

More information

A designers guide to creating & editing templates in EzPz

A designers guide to creating & editing templates in EzPz A designers guide to creating & editing templates in EzPz Introduction...2 Getting started...2 Actions...2 File Upload...3 Tokens...3 Menu...3 Head Tokens...4 CSS and JavaScript included files...4 Page

More information

Produced by. App Development & Modeling. BSc in Applied Computing. Eamonn de Leastar

Produced by. App Development & Modeling. BSc in Applied Computing. Eamonn de Leastar App Development & Modeling BSc in Applied Computing Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie

More information

Apple URL Scheme Reference

Apple URL Scheme Reference Apple URL Scheme Reference Contents Introduction 4 Organization of This Document 4 Mail Links 5 Phone Links 6 Text Links 8 Map Links 9 YouTube Links 12 itunes Links 13 Document Revision History 14 2 Tables

More information

Programming language components

Programming language components Programming language components syntax: grammar rules for defining legal statements what's grammatically legal? how are things built up from smaller things? semantics: what things mean what do they compute?

More information

Copyright. State of New South Wales, Department of Education and Training 2005.

Copyright. State of New South Wales, Department of Education and Training 2005. Copyright State of New South Wales, Department of Education and Training 2005. Published by Centre for Learning Innovation (CLI) 51 Wentworth Rd Strathfield NSW 2135 Copyright of this material is reserved

More information

blink.html 1/1 lectures/6/src/ form.html 1/1 lectures/6/src/

blink.html 1/1 lectures/6/src/ form.html 1/1 lectures/6/src/ blink.html 1/1 3: blink.html 5: David J. Malan Computer Science E-75 7: Harvard Extension School 8: 9: --> 11:

More information

CS 110 Exam 2 Spring 2011

CS 110 Exam 2 Spring 2011 CS 110 Exam 2 Spring 2011 Name (print): Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam in compliance

More information

Vebra Search Integration Guide

Vebra Search Integration Guide Guide Introduction... 2 Requirements... 2 How a Vebra search is added to your site... 2 Integration Guide... 3 HTML Wrappers... 4 Page HEAD Content... 4 CSS Styling... 4 BODY tag CSS... 5 DIV#s-container

More information

jmaki Overview Sang Shin Java Technology Architect Sun Microsystems, Inc.

jmaki Overview Sang Shin Java Technology Architect Sun Microsystems, Inc. jmaki Overview Sang Shin Java Technology Architect Sun Microsystems, Inc. sang.shin@sun.com www.javapassion.com Agenda What is and Why jmaki? jmaki widgets Using jmaki widget - List widget What makes up

More information

First, create a web page with a submit button on it (remember from creating forms in html?):

First, create a web page with a submit button on it (remember from creating forms in html?): Changing Style So far we have only done a little with changing the style of a web page. JavaScript lets us do that as well. We can call a function that allows us to change the style of one or many elements

More information

3Lesson 3: Functions, Methods and Events in JavaScript Objectives

3Lesson 3: Functions, Methods and Events in JavaScript Objectives 3Lesson 3: Functions, Methods and Events in JavaScript Objectives By the end of this lesson, you will be able to: 1.3.1: Use methods as. 1.3.2: Define. 1.3.3: Use data type conversion methods. 1.3.4: Call.

More information

change.html <html> <head><title>change maker</title></head> <body> <h1>change maker</h1> <p>author: Todd Whittaker</p> <script type="text/javascript"

change.html <html> <head><title>change maker</title></head> <body> <h1>change maker</h1> <p>author: Todd Whittaker</p> <script type=text/javascript ITEC 136 Business Programming Concepts Week 04, Part 01 Overview 1 Week 4 Overview Week 3 review Functional Decomposition Top-down design Bottom-up implementation Functions Global vs. Local variables (scope)

More information

Session 16. JavaScript Part 1. Reading

Session 16. JavaScript Part 1. Reading Session 16 JavaScript Part 1 1 Reading Reading Wikipedia en.wikipedia.org/wiki/javascript / p W3C www.w3.org/tr/rec-html40/interact/scripts.html Web Developers Notes www.webdevelopersnotes.com/tutorials/javascript/

More information

At the Forge RJS Templates Reuven M. Lerner Abstract The power of Ajax to fetch and run JavaScript generated by your server-side language. The past few months, I've written a number of articles in this

More information

How the Internet Works

How the Internet Works How the Internet Works The Internet is a network of millions of computers. Every computer on the Internet is connected to every other computer on the Internet through Internet Service Providers (ISPs).

More information

LA TROBE UNIVERSITY SEMESTER ONE EXAMINATION PERIOD CAMPUS AW BE BU MI SH ALLOWABLE MATERIALS

LA TROBE UNIVERSITY SEMESTER ONE EXAMINATION PERIOD CAMPUS AW BE BU MI SH ALLOWABLE MATERIALS LIBRARY USE LA TROBE UNIVERSITY SEMESTER ONE EXAMINATION PERIOD 2013 Student ID: Seat Number: Unit Code: CSE2WD Paper No: 1 Unit Name: Paper Name: Reading Time: Writing Time: Web Development Final 15 minutes

More information

Chapter 16. JavaScript 3: Functions Table of Contents

Chapter 16. JavaScript 3: Functions Table of Contents Chapter 16. JavaScript 3: Functions Table of Contents Objectives... 2 14.1 Introduction... 2 14.1.1 Introduction to JavaScript Functions... 2 14.1.2 Uses of Functions... 2 14.2 Using Functions... 2 14.2.1

More information

The first sample. What is JavaScript?

The first sample. What is JavaScript? Java Script Introduction JavaScript is the most popular scripting language on the internet, and works in all major browsers, such as Internet Explorer, Firefox, Chrome, Opera, and Safari. In this lecture

More information

Creating A Web Page. Computer Concepts I and II. Sue Norris

Creating A Web Page. Computer Concepts I and II. Sue Norris Creating A Web Page Computer Concepts I and II Sue Norris Agenda What is HTML HTML and XHTML Tags Required HTML and XHTML Tags Using Notepad to Create a Simple Web Page Viewing Your Web Page in a Browser

More information

HTML: The Basics & Block Elements

HTML: The Basics & Block Elements HTML: The Basics & Block Elements CISC 282 September 13, 2017 What is HTML? Hypertext Markup Language Markup language "Set of words or symbols" Assigns properties to text Not actually part of the text

More information

Lab 4 CSS CISC1600, Spring 2012

Lab 4 CSS CISC1600, Spring 2012 Lab 4 CSS CISC1600, Spring 2012 Part 1 Introduction 1.1 Cascading Style Sheets or CSS files provide a way to control the look and feel of your web page that is more convenient, more flexible and more comprehensive

More information

CSC Web Programming. Introduction to JavaScript

CSC Web Programming. Introduction to JavaScript CSC 242 - Web Programming Introduction to JavaScript JavaScript JavaScript is a client-side scripting language the code is executed by the web browser JavaScript is an embedded language it relies on its

More information

Header. Report Section. Footer

Header. Report Section. Footer Scan&Solve Cheat Sheet for Modifying Report Format Scan&Solve uses template files to construct the web-ready reports when the [Report ] button is clicked in the View tab. These template files, located

More information

COMS 469: Interactive Media II

COMS 469: Interactive Media II COMS 469: Interactive Media II Agenda Review Data Types & Variables Decisions, Loops, and Functions Review gunkelweb.com/coms469 Review Basic Terminology Computer Languages Interpreted vs. Compiled Client

More information

JavaScript Introduction

JavaScript Introduction JavaScript Introduction What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is usually embedded directly into HTML pages JavaScript is an interpreted language (means

More information

Introduction to Web Development

Introduction to Web Development Introduction to Web Development Lecture 1 CGS 3066 Fall 2016 September 8, 2016 Why learn Web Development? Why learn Web Development? Reach Today, we have around 12.5 billion web enabled devices. Visual

More information

Shane Gellerman 10/17/11 LIS488 Assignment 3

Shane Gellerman 10/17/11 LIS488 Assignment 3 Shane Gellerman 10/17/11 LIS488 Assignment 3 Background to Understanding CSS CSS really stands for Cascading Style Sheets. It functions within an HTML document, so it is necessary to understand the basics

More information

Chapter4: HTML Table and Script page, HTML5 new forms. Asst. Prof. Dr. Supakit Nootyaskool Information Technology, KMITL

Chapter4: HTML Table and Script page, HTML5 new forms. Asst. Prof. Dr. Supakit Nootyaskool Information Technology, KMITL Chapter4: HTML Table and Script page, HTML5 new forms Asst. Prof. Dr. Supakit Nootyaskool Information Technology, KMITL Objective To know HTML5 creating a new style form. To understand HTML table benefits

More information

CSC 415/515 PROJECT 3 JAVASCRIPT CONCENTRATION GAME. 1. Introduction

CSC 415/515 PROJECT 3 JAVASCRIPT CONCENTRATION GAME. 1. Introduction CSC 415/515 PROJECT 3 JAVASCRIPT CONCENTRATION GAME PROF. GODFREY MUGANDA DEPT OF COMPUTER SCIENCE 1. Introduction Using JavaScript, write a game that will help people work on their concentration and memory

More information

introjs.notebook March 02, 2014

introjs.notebook March 02, 2014 1 document.write() uses the write method to write on the document. It writes the literal Hello World! which is enclosed in quotes since it is a literal and then enclosed in the () of the write method.

More information

CGS 3066: Spring 2015 JavaScript Reference

CGS 3066: Spring 2015 JavaScript Reference CGS 3066: Spring 2015 JavaScript Reference Can also be used as a study guide. Only covers topics discussed in class. 1 Introduction JavaScript is a scripting language produced by Netscape for use within

More information

Loops/Confirm Tutorial:

Loops/Confirm Tutorial: Loops/Confirm Tutorial: What you ve learned so far: 3 ways to call a function how to write a function how to send values into parameters in a function How to create an array (of pictures, of sentences,

More information

Why HTML5? Why not XHTML2? Learning from history how to drive the future of the Web

Why HTML5? Why not XHTML2? Learning from history how to drive the future of the Web Why HTML5? Why not XHTML2? Learning from history how to drive the future of the Web Michael(tm) Smith mike@w3.org http://people.w3.org/mike sideshowbarker on Twitter, GitHub, &c W3C Interaction domain

More information

Exercise 1 Using Boolean variables, incorporating JavaScript code into your HTML webpage and using the document object

Exercise 1 Using Boolean variables, incorporating JavaScript code into your HTML webpage and using the document object CS1046 Lab 5 Timing: This lab should take you approximately 2 hours. Objectives: By the end of this lab you should be able to: Recognize a Boolean variable and identify the two values it can take Calculate

More information

Building Your Blog Audience. Elise Bauer & Vanessa Fox BlogHer Conference Chicago July 27, 2007

Building Your Blog Audience. Elise Bauer & Vanessa Fox BlogHer Conference Chicago July 27, 2007 Building Your Blog Audience Elise Bauer & Vanessa Fox BlogHer Conference Chicago July 27, 2007 1 Content Community Technology 2 Content Be. Useful Entertaining Timely 3 Community The difference between

More information

JavaScript: Introduction, Types

JavaScript: Introduction, Types JavaScript: Introduction, Types Computer Science and Engineering College of Engineering The Ohio State University Lecture 19 History Developed by Netscape "LiveScript", then renamed "JavaScript" Nothing

More information

Inline Elements Karl Kasischke WCC INP 150 Winter

Inline Elements Karl Kasischke WCC INP 150 Winter Inline Elements 2009 Karl Kasischke WCC INP 150 Winter 2009 1 Inline Elements Emphasizing Text Increasing / Decreasing Text Size Quotes and Citations Code, Variables, and Sample Output Spanning Text Subscripts

More information

CSCI 5333 DBMS Spring 2018 Final Examination. Last Name: First Name: Student Id:

CSCI 5333 DBMS Spring 2018 Final Examination. Last Name: First Name: Student Id: CSCI 5333 DBMS Spring 2018 Final Examination Last Name: First Name: Student Id: Number: Time allowed: two hours. Total score: 100 points. This is a closed book examination but you can bring a cheat sheet.

More information

Web Publishing Basics I

Web Publishing Basics I Web Publishing Basics I Jeff Pankin Information Services and Technology Contents Course Objectives... 2 Creating a Web Page with HTML... 3 What is Dreamweaver?... 3 What is HTML?... 3 What are the basic

More information

CSCI 1100L: Topics in Computing Spring 2018 Web Page Project 50 points

CSCI 1100L: Topics in Computing Spring 2018 Web Page Project 50 points CSCI 1100L: Topics in Computing Spring 2018 Web Page Project 50 points Project Due (All lab sections): Check on elc Assignment Objectives: Lookup and correctly use HTML tags. Lookup and correctly use CSS

More information

Terms and Conditions of Website Use

Terms and Conditions of Website Use Terms and Conditions of Website Use This website (the "Site") is owned and operated by Hoshizaki Lancer Pty Ltd (ABN 84 007 706 461) ("Hoshizaki Lancer") and may contain material from Hoshizaki Lancer

More information

Lecture 2: Tools & Concepts

Lecture 2: Tools & Concepts Lecture 2: Tools & Concepts CMPSCI120 Editors WIN NotePad++ Mac Textwrangler 1 Secure Login Go WIN SecureCRT, PUTTY WinSCP Mac Terminal SFTP WIN WinSCP Mac Fugu 2 Intro to unix pipes & filters file system

More information

Basics of Page Format

Basics of Page Format Basics of Page Format HTML Structural Tags Certain HTML tags provide the structure of the HTML document. These include the tag, the tag, the tag, and the tag. As soon as a

More information

How to Make a Contact Us PAGE in Dreamweaver

How to Make a Contact Us PAGE in Dreamweaver We found a great website on the net called http://dreamweaverspot.com and we have basically followed their tutorial for creating Contact Forms. We also checked out a few other tutorials we found by Googling,

More information

Building Desktop RIAs with PHP, HTML & Javascript in AIR. Ed Finkler, ZendCon08, September 17, 2008 funkatron.com /

Building Desktop RIAs with PHP, HTML & Javascript in AIR. Ed Finkler, ZendCon08, September 17, 2008 funkatron.com / Building Desktop RIAs with PHP, HTML & Javascript in AIR Ed Finkler, ZendCon08, September 17, 2008 funkatron.com / funkatron@gmail.com What is AIR? For the desktop Not a browser plugin Build desktop apps

More information

Functions. INFO/CSE 100, Spring 2006 Fluency in Information Technology.

Functions. INFO/CSE 100, Spring 2006 Fluency in Information Technology. Functions INFO/CSE 100, Spring 2006 Fluency in Information Technology http://www.cs.washington.edu/100 4/24/06 fit100-12-functions 1 Readings and References Reading» Fluency with Information Technology

More information

Chapter 14 JavaScript and DHTML

Chapter 14 JavaScript and DHTML Chapter 14 JavaScript and DHTML Presented by Thomas Powell Slides adopted from HTML & XHTML: The Complete Reference, 4th Edition 2003 Thomas A. Powell Web Programming Toolbox Redux Java Applets Scripting

More information

TERMS AND CONDITIONS

TERMS AND CONDITIONS TERMS AND CONDITIONS BACKGROUND: This agreement applies as between you, the User of this Website and NWM, the owner(s) of this Website. Your agreement to comply with and be bound by these terms and conditions

More information

introduction to XHTML

introduction to XHTML introduction to XHTML XHTML stands for Extensible HyperText Markup Language and is based on HTML 4.0, incorporating XML. Due to this fusion the mark up language will remain compatible with existing browsers

More information

Arc en Ciel Ltd. Gazetteer Webservice FactSheet

Arc en Ciel Ltd. Gazetteer Webservice FactSheet Arc en Ciel Ltd. Gazetteer Webservice FactSheet Overview We provide two gazetteer webservices: on place name and on street name. The place name service allows a user to browse for any town, village or

More information

HTML HTML. Chris Seddon CRS Enterprises Ltd 1

HTML HTML. Chris Seddon CRS Enterprises Ltd 1 Chris Seddon seddon-software@keme.co.uk 2000-12 CRS Enterprises Ltd 1 2000-12 CRS Enterprises Ltd 2 Reference Sites W3C W3C w3schools DevGuru Aptana GotAPI Dog http://www.w3.org/ http://www.w3schools.com

More information

CMT111-01/M1: HTML & Dreamweaver. Creating an HTML Document

CMT111-01/M1: HTML & Dreamweaver. Creating an HTML Document CMT111-01/M1: HTML & Dreamweaver Bunker Hill Community College Spring 2011 Instructor: Lawrence G. Piper Creating an HTML Document 24 January 2011 Goals for Today Be sure we have essential tools text editor

More information

I Can t Believe It s Not

I Can t Believe It s Not I Can t Believe It s Not Flash! @thomasfuchs Animating CSS properties Timer JavaScript sets CSS Reflow Rendering Paint Animating CSS properties Timer JavaScript sets CSS Reflow

More information

Documents and computation. Introduction to JavaScript. JavaScript vs. Java Applet. Myths. Standard

Documents and computation. Introduction to JavaScript. JavaScript vs. Java Applet. Myths. Standard Introduction to Prof. Andrea Omicini & Ing. Giulio Piancastelli II Facoltà di Ingegneria, Cesena Alma Mater Studiorum, Università di Bologna andrea.omicini@unibo.it, giulio.piancastelli@unibo.it HTML Documents

More information

Controlled Assessment Task. Question 1 - Describe how this HTML code produces the form displayed in the browser.

Controlled Assessment Task. Question 1 - Describe how this HTML code produces the form displayed in the browser. Controlled Assessment Task Question 1 - Describe how this HTML code produces the form displayed in the browser. The form s code is displayed in the tags; this creates the object which is the visible

More information

Session 6. JavaScript Part 1. Reading

Session 6. JavaScript Part 1. Reading Session 6 JavaScript Part 1 Reading Reading Wikipedia en.wikipedia.org/wiki/javascript Web Developers Notes www.webdevelopersnotes.com/tutorials/javascript/ JavaScript Debugging www.w3schools.com/js/js_debugging.asp

More information

TERMS & CONDITIONS. Complied with GDPR rules and regulation CONDITIONS OF USE PROPRIETARY RIGHTS AND ACCEPTABLE USE OF CONTENT

TERMS & CONDITIONS. Complied with GDPR rules and regulation CONDITIONS OF USE PROPRIETARY RIGHTS AND ACCEPTABLE USE OF CONTENT TERMS & CONDITIONS www.karnevalkings.com (the "Site") is a website and online service owned and operated by the ViisTek Media group of companies (collectively known as "Karnevalkings.com", "we," "group",

More information

EXERCISE: Introduction to client side JavaScript

EXERCISE: Introduction to client side JavaScript EXERCISE: Introduction to client side JavaScript Barend Köbben Version 1.3 March 23, 2015 Contents 1 Dynamic HTML and scripting 3 2 The scripting language JavaScript 3 3 Using Javascript in a web page

More information

CSCI DBMS Spring 2017 Final Examination. Last Name: First Name: Student Id:

CSCI DBMS Spring 2017 Final Examination. Last Name: First Name: Student Id: CSCI 5333.2 DBMS Spring 2017 Final Examination Last Name: First Name: Student Id: Number: Time allowed: two hours. Total score: 100 points. This is a closed book examination but you can bring a cheat sheet.

More information

from RichoSoft Get Started Install Part 2 Blocking GA Blocking Other Cookie Scripts How It Works License IMPORTANT: You will require:

from RichoSoft Get Started Install Part 2 Blocking GA Blocking Other Cookie Scripts How It Works License IMPORTANT: You will require: Welcome to the Sites - Install/Users Guide. What is in this pack?: Zip File Pack includes: 3 Javacscript Libraries. Code to aid the prevention of Cookie writing by Scripts including Google Analytics. A

More information

Command-driven, event-driven, and web-based software

Command-driven, event-driven, and web-based software David Keil Spring 2009 Framingham State College Command-driven, event-driven, and web-based software Web pages appear to users as graphical, interactive applications. Their graphical and interactive features

More information

Terms Of Use AGREEMENT BETWEEN USER AND DRAKE MODIFICATION OF THESE TERMS OF USE LINKS TO THIRD PARTY WEB SITES USE OF COOKIES

Terms Of Use AGREEMENT BETWEEN USER AND DRAKE MODIFICATION OF THESE TERMS OF USE LINKS TO THIRD PARTY WEB SITES USE OF COOKIES Terms Of Use AGREEMENT BETWEEN USER AND DRAKE This website and other related websites and mobile applications (collectively referred to as "Sites") comprise various web pages and services operated by Drake

More information

CSCI 5333 DBMS Fall 2017 Final Examination. Last Name: First Name: Student Id:

CSCI 5333 DBMS Fall 2017 Final Examination. Last Name: First Name: Student Id: CSCI 5333 DBMS Fall 2017 Final Examination Last Name: First Name: Student Id: Number: Time allowed: two hours. Total score: 100 points. This is a closed book examination but you can bring a cheat sheet.

More information

Exercise 1: Basic HTML and JavaScript

Exercise 1: Basic HTML and JavaScript Exercise 1: Basic HTML and JavaScript Question 1: Table Create HTML markup that produces the table as shown in Figure 1. Figure 1 Question 2: Spacing Spacing can be added using CellSpacing and CellPadding

More information

History of the Internet. The Internet - A Huge Virtual Network. Global Information Infrastructure. Client Server Network Connectivity

History of the Internet. The Internet - A Huge Virtual Network. Global Information Infrastructure. Client Server Network Connectivity History of the Internet It is desired to have a single network Interconnect LANs using WAN Technology Access any computer on a LAN remotely via WAN technology Department of Defense sponsors research ARPA

More information

3 The Building Blocks: Data Types, Literals, and Variables

3 The Building Blocks: Data Types, Literals, and Variables chapter 3 The Building Blocks: Data Types, Literals, and Variables 3.1 Data Types A program can do many things, including calculations, sorting names, preparing phone lists, displaying images, validating

More information

WIRIS quizzes web services Getting started with PHP and Java

WIRIS quizzes web services Getting started with PHP and Java WIRIS quizzes web services Getting started with PHP and Java Document Release: 1 2010 december, Maths for More www.wiris.com Summary This document provides client examples for PHP and Java. Contents WIRIS

More information

ORB Education Quality Teaching Resources

ORB Education Quality Teaching Resources JavaScript is one of the programming languages that make things happen in a web page. It is a fantastic way for students to get to grips with some of the basics of programming, whilst opening the door

More information

JavaScript (5A) JavaScript

JavaScript (5A) JavaScript JavaScript (5A) JavaScript Copyright (c) 2012 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any

More information

Session 3: JavaScript - Structured Programming

Session 3: JavaScript - Structured Programming INFM 603: Information Technology and Organizational Context Session 3: JavaScript - Structured Programming Jimmy Lin The ischool University of Maryland Thursday, September 25, 2014 Source: Wikipedia Types

More information

Terms of Use. Changes. General Use.

Terms of Use. Changes. General Use. Terms of Use THESE TERMS AND CONDITIONS (THE TERMS ) ARE A LEGAL CONTRACT BETWEEN YOU AND SPIN TRANSFER TECHNOLOGIES ( SPIN TRANSFER TECHNOLOGIES, STT, WE OR US ). THE TERMS EXPLAIN HOW YOU ARE PERMITTED

More information

Working with JavaScript

Working with JavaScript Working with JavaScript Creating a Programmable Web Page for North Pole Novelties 1 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page 2 Objectives

More information

Digital Asset Management 2. Introduction to Digital Media Format

Digital Asset Management 2. Introduction to Digital Media Format Digital Asset Management 2. Introduction to Digital Media Format 2009-09-24 Outline Image format and coding methods Audio format and coding methods Video format and coding methods Introduction to HTML

More information

Part 3: Dynamic Data: Querying the Database

Part 3: Dynamic Data: Querying the Database Part 3: Dynamic Data: Querying the Database In this section you will learn to Write basic SQL statements Create a Data Source Name (DSN) in the ColdFusion Administrator Turn on debugging in the ColdFusion

More information

PRODUCT DOCUMENTATION. Installing and Implementing Enterprise Contact Center Chat RELEASE 5.1

PRODUCT DOCUMENTATION. Installing and Implementing Enterprise Contact Center Chat RELEASE 5.1 PRODUCT DOCUMENTATION Installing and Implementing Enterprise Contact Center Chat RELEASE 5.1 Document and Software Copyrights Copyright 1998 2009 ShoreTel, Inc. All rights reserved. Printed in the United

More information

HTML 5 Form Processing

HTML 5 Form Processing HTML 5 Form Processing In this session we will explore the way that data is passed from an HTML 5 form to a form processor and back again. We are going to start by looking at the functionality of part

More information

PES DEGREE COLLEGE BANGALORE SOUTH CAMPUS 1 K.M. before Electronic City, Bangalore WEB PROGRAMMING Solution Set II

PES DEGREE COLLEGE BANGALORE SOUTH CAMPUS 1 K.M. before Electronic City, Bangalore WEB PROGRAMMING Solution Set II PES DEGREE COLLEGE BANGALORE SOUTH CAMPUS 1 K.M. before Electronic City, Bangalore 560 100 WEB PROGRAMMING Solution Set II Section A 1. This function evaluates a string as javascript statement or expression

More information