Programming in JavaScript

Slides:



Advertisements
Similar presentations
23-Aug-14 HTML/XHTML Forms. 2 What are forms? is just another kind of XHTML/HTML tag Forms are used to create (rather primitive) GUIs on Web pages Usually.
Advertisements

24-Aug-14 HTML Forms. 2 What are forms? is just another kind of HTML tag HTML forms are used to create (rather primitive) GUIs on Web pages Usually the.
JavaScript Part 6. Calling JavaScript functions on an event JavaScript doesn’t have a main function like other programming languages but we can imitate.
The Web Warrior Guide to Web Design Technologies
CIS101 Introduction to Computing Week 08. Agenda Your questions JavaScript text Resume project HTML Project Six This week online Next class.
Tutorial 10 Programming with JavaScript
* Just the gist? * Lots of details? * Specific steps? * What language ?
1 Events Lect 8. 2 Event-driven Pages one popular feature of the Web is its interactive nature e.g., you click on buttons to make windows appear e.g.,
Javascript and the Web Whys and Hows of Javascript.
The audio will be turned on just before our start time at 7:00 pm ET.
ACM Web Development Workshop - PHP By Luis Torres.
 2003 Prentice Hall, Inc. All rights reserved. CHAPTER 3 JavaScript 1.
1 Project 7: My Photo Album Graded Project. 2 Assignment Write a web app to permit users to upload and view photos. User can keep up to five photos on.
Moodle (Course Management Systems). Assignments 1 Assignments are a refreshingly simple method for collecting student work. They are a simple and flexible.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
Tutorial 10 Programming with JavaScript. XP Objectives Learn the history of JavaScript Create a script element Understand basic JavaScript syntax Write.
Tutorial 10 Programming with JavaScript
Topic: An Introduction to JavaScript - from Beginning JavaScript by Wilton (WROX)
 2003 Prentice Hall, Inc. All rights reserved. CHAPTER 3 JavaScript 1.
How to Recall after Submitting a Tk20 Assignment Use this when you submitted the wrong document to an assignment and need to submit a different or more.
Forms and Server Side Includes. What are Forms? Forms are used to get user input We’ve all used them before. For example, ever had to sign up for courses.
Get Access to your Online Course Tools Course: Instructor: Office: Hours:
11 Project 2 Towers of Hanoi. 22 Towers of Hanoi is a well known puzzle that can be very difficult to solve manually but can be programmed very easily.
Introduction to JavaScript CS101 Introduction to Computing.
ECA 225 Applied Interactive Programming1 ECA 225 Applied Online Programming basics.
Implementing and Using the SIRWEB Interface Setup of the CGI script and web procfile Connecting to your database using HTML Retrieving data using the CGI.
Introduction To JavaScript. Putting it Together (page 11) All javascript must go in-between the script tags. All javascript must go in-between the script.
Loops.  (No Quiz)  Hand in Assignment #1  Last chance for Q+A on the midterm  Loops 2.
Making dynamic pages with javascript Lecture 1. Java script java versus javascript Javascript is a scripting language that will allow you to add real.
Introduction to JavaScript CSc 2320 Fall 2014 Disclaimer: All words, pictures are adopted from “Simple JavaScript”by Kevin Yank and Cameron Adams and also.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
1-Feb-16 Blackboard. Web sites All substantive information about this course is on the course website,
1 Project 2: Using Variables and Expressions. 222 Project 2 Overview For this project you will work with three programs Circle Paint Ideal_Weight What.
1 Project 7: Looping. Project 7 For this project you will produce two Java programs. The requirements for each program will be described separately on.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
JavaScript Events Java 4 Understanding Events Events add interactivity between the web page and the user You can think of an event as a trigger that.
1 Project 5: Leap Years. 222 Leap Years Write a program that reads an integer value from the user representing a year and determines if the year is a.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
JavaScript and AJAX 2nd Edition Tutorial 1 Programming with JavaScript.
Fab25 User Training Cerium Labs LabCollector - LIMS Lynette Ballast.
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
REEM ALMOTIRI Information Technology Department Majmaah University.
1 Project 12: Cars from File. This is an extension of Project 11, Car Class You may use the posted solution for Project 11 as a starting point for this.
JavaScript Part 1 Introduction to scripting The ‘alert’ function.
Development Environment
CHAPTER 10 JAVA SCRIPT.
Tutorial 10 Programming with JavaScript
Getting Started with C.
Visual programming Chapter 1: Introduction
JavaScript Functions.
Adding Assignments and Learning Units to Your TSS Course
Assembler, Compiler, Interpreter
T. Jumana Abu Shmais – AOU - Riyadh
Programming in JavaScript
Programming in JavaScript
Assembler, Compiler, Interpreter
Python programming exercise
LMC Little Man Computer What do you know about LMC?
Programming in JavaScript
Tutorial 10 Programming with JavaScript
Programming in JavaScript
Inside a PMI Online Course
Welcome to AP Computer Science A!
Programming in JavaScript
Java Programming with BlueJ Objectives
Programming in JavaScript
Unit 3: Variables in Java
Introduction to JavaScript
Intro to Programming (in JavaScript)
Presentation transcript:

Programming in JavaScript University of Management and Technology 1901 Fort Myer Drive, Suite 700 Arlington, VA 22009 Voice: (703) 516-0035 Fax: (703) 516-0985 Website: http://www.umtweb.edu

Learning Objectives Upon completing this module, the student should be able to: Understand and Use Variables Understand and Call Functions Answer all questions at the end of Chapters 3 and 4 of the book.

Variables The book makes understanding variables quite easy. We’ll add a little here: Most languages have a way to define constants. A constant is a value that cannot be changed. In some languages, constants are variables that are not allowed to be changed. In some languages, constants are variables that should not be changed. In some languages, constants look like variables, but are really just values that are used by the compiler or interpreter. JavaScript does not have a way to define or use constants! Many languages require that the type of the variable be defined. For instance, in Java you might define: int x; Which means to define a variable called x and to specify that it will contain an integer. These languages are “strongly typed”. JavaScript is not “typed”, because: var x; Can contain an integer, a floating point value, a string, or anything you like.

Functions Likewise, the book does a good job on functions, but here’s a little more info: Many languages, especially “strongly typed” languages, make a distinction between functions and subroutines. A function returns a value of a certain type A subroutine does not return a value (in other words, it’s a function that does not return a value) Since JavaScript is not a “strongly typed” language, there is no reason to make a distinction between functions that return a value and those that don’t.

Your Second Graded Assignment Using only the techniques from modules one and two, and chapters one through four of the textbook: Create two files, one named second.html and the other named second.js Write code to create a web page that uses a JavaScript program to output a NASA style count down: Ten Nine … One Ignition Start Liftoff We have Liftoff! Each line must be displayed as an alert Create a generic function that outputs one line of the countdown as an alert, and receives the data to output as an input parameter. Use that function to output each line of the countdown. Each line, after the first line, must only be output when the user clicks “Ok” in response to the alert.

Your Second Graded Assignment, Cont. Use comments and lay the code out so it can be easily followed! Each file in the assignment must have a comment at the top, using the correct commenting technique for the file type, like this: Your Name Your Student ID CST140 Assignment 2 Test your program by opening the web page in your browser. You should see the NASA countdown displayed as a series of alerts (which are displayed one at a time in a popup window.) Click the OK button to display the next line in the countdown. No text is required to be written directly to the browser window.

Submitting Assignments for Grading Your assignment must be uploaded to your instructor via your Student Portal. Emailed assignments are NOT accepted for this course! You can only upload one file per assignment. Since this assignment requires multiple files, you must create a .zip file. If you are using a recent version of Microsoft windows, you can create the ZIP file (compressed folder) by creating a new folder anywhere in your computer’s file system and putting the files in that folder. Then right-click on the folder and select “Send to” and then “compressed (zipped) folder”. Alternatively, you can use a program such as WinZIP (winzip.com). It doesn’t matter what you name the file you upload except that the file extension must be .zip.

Submitting Assignments for Grading, Cont. Once uploaded you cannot upload the assignment again unless reset by your instructor – please take the time to do it right the first time!