Java Script Programming. Review: Event Handling Text Box Title: Button.

Slides:



Advertisements
Similar presentations
JavaScript I. JavaScript is an object oriented programming language used to add interactivity to web pages. Different from Java, even though bears some.
Advertisements

JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
The Web Warrior Guide to Web Design Technologies
Lecture # 9 JavaScript Programming I. Today Questions: From notes/reading/life? Spreadsheet Review Preview Lab # 4 1.Introduce: How can I write a program.
Georgia Institute of Technology JavaScript part 2 Barb Ericson Georgia Institute of Technology May 2006.
Computer Science 103 Chapter 3 Introduction to JavaScript.
MSc. Publishing on WWW JavaScript. What is JavaScript? A scripting language devised by Netscape Adds functionality to web pages by: Embedding code into.
CIS101 Introduction to Computing Week 11. Agenda Your questions Copy and Paste Assignment Practice Test JavaScript: Functions and Selection Lesson 06,
Introduction to JavaScript for Python Programmers
INFM 603: Information Technology and Organizational Context Jimmy Lin The iSchool University of Maryland Thursday, October 18, 2012 Session 7: PHP.
 2003 Prentice Hall, Inc. All rights reserved. CHAPTER 3 JavaScript 1.
Event Handlers CS101 Introduction to Computing. Learning Goals Learn about event handlers Determine how events are useful in JavaScript Discover where.
SYST Web Technologies SYST Web Technologies Lesson 6 – Intro to JavaScript.
Fluency with Information Technology INFO100 and CSE100 Katherine Deibel Katherine Deibel, Fluency in Information Technology1.
The Web Wizard’s Guide To JavaScript Chapter 6 Working with Dates and Times.
Week 9 PHP Cookies and Session Introduction to JavaScript.
CSC 330 E-Commerce Teacher Ahmed Mumtaz Mustehsan Ahmed Mumtaz Mustehsan GM-IT CIIT Islamabad GM-IT CIIT Islamabad CIIT Virtual Campus, CIIT COMSATS Institute.
A little PHP. Enter the simple HTML code seen below.
Lecture # 6 Forms, Widgets and Event Handling. Today Questions: From notes/reading/life? Share Personal Web Page (if not too personal) 1.Introduce: How.
Fluency with Information Technology INFO100 and CSE100 Katherine Deibel Katherine Deibel, Fluency in Information Technology1.
 2003 Prentice Hall, Inc. All rights reserved. CHAPTER 3 JavaScript 1.
Dynamic Web Pages & JavaScript. Dynamic Web Pages Dynamic = Change Dynamic Web Pages are web pages that change. More than just moving graphics around.
Introduction.  The scripting language most often used for client-side web development.  Influenced by many programming languages, easier for nonprogrammers.
JavaScript - A Web Script Language Fred Durao
PHP Form Introduction Getting User Information Text Input.
Intro to JavaScript. Some simple examples Examples from our webpage Examples from Andrews webpage Today’s Example.
HTML Form Widgets. Review: HTML Forms HTML forms are used to create web pages that accept user input Forms allow the user to communicate information back.
1 JavaScript
An Introduction to JavaScript By: John Coliton Tuesday, November 10, 1998 Center for Teaching and Learning.
CSD 340 (Blum)1 Starting JavaScript Homage to the Homage to the Square.
JavaScript Scripting language What is Scripting ? A scripting language, script language, or extension language is a programming language.
XP Tutorial 8 Adding Interactivity with ActionScript.
The Teacher Computing HTML HyperText Markup Language.
CSD 340 (Blum)1 Starting JavaScript Homage to the Homage to the Square.
Copyright © Texas Education Agency, All rights reserved.1 Web Technologies Website Forms / Data Acquisition.
Introduction into JavaScript Java 1 JavaScript JavaScript programs run from within an HTML document The statements that make up a program in an HTML.
HTML Overview Part 5 – JavaScript 1. Scripts 2  Scripts are used to add dynamic content to a web page.  Scripts consist of a list of commands that execute.
CIS 375—Web App Dev II JavaScript I. 2 Introduction to DTD JavaScript is a scripting language developed by ________. A scripting language is a lightweight.
Event Handling. Objectives Using event handlers Simulating events Using event-related methods.
Are You Smarter Than a 5 th Grader? 1,000,000 5th Grade HTML 5th Grade Syntax 4th Grade HTML 4th Grade Syntax 3rd Grade HTML 3rd Grade Syntax 2nd Grade.
Functions.  Assignment #2 is now due on Wednesday, Nov 25 th  (No Quiz)  Go over the midterm  Backtrack and re-cover the question about tracing the.
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.
JavaScript 101 Lesson 6: Introduction to Functions.
JavaScript Events. Understanding Events Events add interactivity between the web page and the user Events add interactivity between the web page and the.
JavaScript Tutorial. What is JavaScript JavaScript is the programming language of HTML and the Web Programming makes computers do what you want them to.
Web Forms. Web Forms: A form allows our web visitors to submit information to us. Some examples uses for forms are to let the web user contact us, fill.
INTERNET APPLICATIONS CPIT405 JavaScript Instructor: Rasha AlOmari
Lecture # 12 JavaScript Functions and Debugging. Today Questions: Quiz 1? Review for Quiz 2. 1.Introduce: How can you make an On-line Grocery List? 2.Explain:
JavaScript, Third Edition 1 SELECTION LIST Demo. JavaScript, Third Edition 2 Description This web page will edit the slection to ensure an option was.
Client-side (JavaScript) Validation. Associating a function with a click event – Part 1 Use the input tag’s onclick attribute to associate a function.
A little PHP. Enter the simple HTML code seen below.
A little PHP.
CHAPTER 10 JAVA SCRIPT.
>> JavaScript: Location, Functions and Objects
© 2015, Mike Murach & Associates, Inc.
Barb Ericson Georgia Institute of Technology May 2006
JavaScript.
Event Driven Programming & User Defined Functions
We are starting to program with JavaScript
The Web Wizard’s Guide To JavaScript
JavaScript What is JavaScript? What can JavaScript do?
Unit 6 part 3 Test Javascript Test.
JavaScript What is JavaScript? What can JavaScript do?
Unit 6 part 6 Test Javascript Test.
The Web Wizard’s Guide To JavaScript
Introduction to JavaScript
This is an introduction to JavaScript using the examples found at the CIS17 website. In previous examples I specified language = Javascript, instead of.
Murach's JavaScript and jQuery (3rd Ed.)
Presentation transcript:

Java Script Programming

Review: Event Handling Text Box Title: Button

JavaScript Adds programming to web pages Performing calculations –Totaling the price or computing sales tax Verifying data –Credit cards Adapting the display to user needs

Basic JavaScript Everything inside is a program We can use variables and expressions –Pay = payRate*hours We can write and reuse our own functions

What are the variable names? HTML Form Widgets Demo Title: US Citizen: Freshman Sophomore Junior Senior Type your address here. red yellow

What are the variable names? HTML Form Widgets Demo Title: US Citizen: Freshman Sophomore Junior Senior Type your address here. red yellow All the same name

Functions A function is a piece of computation that takes 1 or more arguments (data) and returns a value In Javascript, you can make functions yourself, and there are also predefined functions.

Creating your functions Tell the browser that you are going to write code. Use the tag

Functions To create a function function Name( parameterName,... ) {any JavaScript Code } To call a function –function Name(argument expression,... ) –Each argument is assigned to each parameter –The body { } of the function is executed.

An example function function pay(payRate,hours) { return payRate*hours; }

An example function function pay(payRate,hours) { return payRate*hours; } Variables

Function Demo function sayHello() { alert("Hello " + demoform.title.value) }

Putting Strings Together (concatenation) Use the “+” sign to put strings together. Demo

Functions with If and Else function evaluatePay() { if (demoform.totalPay.value < 100) { alert("You earn less than 100 dollars") } else { alert("You earn more than 100 dollars.") }

Functions with If and Else Demo