Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 14 Key Concepts 1 Copyright © Terry Felke-Morris.

Slides:



Advertisements
Similar presentations
1 What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language A scripting language is a lightweight.
Advertisements

MWD1001 Website Production Using JavaScript with Forms.
Javascript Introduction Norman White Material is from w3schools.com Go there to run examples interactively.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 - JavaScript: Introduction to Scripting Outline 7.1 Introduction 7.2 Simple Program: Printing.
JavaScript Describe common uses of JavaScript in Web pages.
Web Development & Design Foundations with XHTML Chapter 14 Key Concepts.
CIS101 Introduction to Computing Week 12 Spring 2004.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 14 Key Concepts 1 Copyright © Terry Felke-Morris.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 14 Key Concepts 1 Copyright © Terry Felke-Morris.
Lesson 8 Creating Forms with JavaScript
Client-Side programming with JavaScript 3
JavaScript Form Validation
Department of Information Technology e-Michigan Web Development 0 HTML Form Creation in the Vignette Content Management Application.
Chapter 3 Using Validation Controls. What is a Validation Control? A control that validates the value in another control Renders as an HTML tag with an.
Scott Marino MSMIS Summer Session Web Site Design and Authoring Session 9 Scott Marino.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
 2003 Prentice Hall, Inc. All rights reserved. CHAPTER 3 JavaScript 1.
CSCI 6962: Server-side Design and Programming Introduction to AJAX.
INTERNET APPLICATION DEVELOPMENT For More visit:
JavaScript Part 1.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 14 Key Concepts 1 Copyright © Terry Felke-Morris.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 2 Key Concepts 1 Copyright © Terry Felke-Morris.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
G053 - Lecture 16 Validating Forms Mr C Johnston ICT Teacher
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
CO1552 Web Application Development HTML Forms, Events and an introduction to JavaScript.
Client-Side Scripting JavaScript.  produced by Netscape for use within HTML Web pages.  built into all the major modern browsers. properties  lightweight,
HTML Forms.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
Copyright 2002, Paradigm Publishing Inc. CHAPTER 12 BACKNEXTEND 12-1 LINKS TO OBJECTIVES Mail Merge Concepts Mail Merge Concepts Mail Merge Wizard Mail.
JavaScript, jQuery, and Mashups Incorporating JavaScript, jQuery, and other Mashups into existing pages.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
1 JavaScript
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
The Web Wizard’s Guide To JavaScript Chapter 8 Working with Windows and Frames.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
The Web Wizard’s Guide To JavaScript Chapter 3 Working with Forms.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
1 JavaScript Part 3. Functions Allow the user to decide when a particular script should be run by the browser in stead of running as long as the page.
Pertemuan 5 IT133 Pengembangan Web JavaScript. What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 14 Key Concepts 1 Copyright © Terry Felke-Morris.
CSC317 – INTERNET PROGRAMMING CSC318 – DYNAMIC WEB APPLICATION DEVELOPMENT BY: SITI NURBAYA ISMAIL FACULTY of COMPUTER and MATHEMATICAL SCIENCES.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 2- part 2 Key Concepts 1 Copyright © Terry Felke-Morris.
Web Development & Design Foundations with XHTML Chapter 14 Key Concepts.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 2 Key Concepts 1 Copyright © Terry Felke-Morris.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 14 Key Concepts 1 Copyright © Terry Felke-Morris.
FORMS Explained By: Jasdeep Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
JavaScript, Third Edition 1 SELECTION LIST Demo. JavaScript, Third Edition 2 Description This web page will edit the slection to ensure an option was.
Copyright © Terry Felke-Morris Web Development & Design Foundations with HTML5 8 th Edition CHAPTER 14 KEY CONCEPTS 1 Copyright.
Client-side (JavaScript) Validation. Associating a function with a click event – Part 1 Use the input tag’s onclick attribute to associate a function.
IS1500: Introduction to Web Development
CHAPTER 10 JAVA SCRIPT.
Web Development & Design Foundations with HTML5
Web Development & Design Foundations with HTML5 7th Edition
WEB PROGRAMMING JavaScript.
The Web Wizard’s Guide To JavaScript
JavaScript Form Validation
Web Development & Design Foundations with H T M L 5
CS105 Introduction to Computer Concepts
BY: SITI NURBAYA ISMAIL FACULTY of COMPUTER and MATHEMATICAL SCIENCES
JavaScript Part 2.
Web Development & Design Foundations with H T M L 5
Relational Operators.
Web Programming– UFCFB Lecture 13
CS105 Introduction to Computer Concepts JavaScript
Intro to Programming (in JavaScript)
Web Development & Design Foundations with HTML5 7th Edition
Presentation transcript:

Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 14 Key Concepts 1 Copyright © Terry Felke-Morris

ARITHMETIC OPERATORS OperatorDescriptionExampleValue of Quantity =assignquantity = additionquantity = subtractionquantity = *multiplicationquantity = 10 * 220 /divisionquantity = 10 / 25 2

COMPARISON OPERATORS OperatorDescriptionExampleSample values of quantity that would result in true = =Double equals sign (equivalent) “is exactly equal to” quantity = = 1010 >Greater thanquantity > 1011, 12 (but not 10) > =Greater than or equal to quantity > = 1010, 11, 12 <Less thanquantity < 108, 9 (but not 10) < =Less than or equal to quantity < = 108, 9, 10 ! =Not equal toquantity ! = 108, 9, 11 (but not 10) 3

Copyright © Terry Felke-Morris DECISION MAKING if (condition) { … commands to execute if condition is true } else { … commands to execute if condition is false } 4

Copyright © Terry Felke-Morris HANDS-ON PRACTICE 14.6  Page 576  chapter14/quantityif.html 5

Copyright © Terry Felke-Morris FUNCTION  A function is a block of one or more JavaScript statements with a specific purpose, which can be run when needed. function function_name() {... JavaScript statements … } 6

Copyright © Terry Felke-Morris USING FUNCTIONS function showAlert() { alert("Please click OK to continue."); } 7 Calling the Function showAlert(); Defining the Function

Copyright © Terry Felke-Morris HANDS-ON PRACTICE 14.7  Page 579  chapter14/quantityif2.html 8

Copyright © Terry Felke-Morris FORM VALIDATION  It is common to use JavaScript to validate form information before submitting it to the web server.  Is the name entered?  Is the address of correct format?  Is the phone number in the correct format?  See Hands-on Practice

Copyright © Terry Felke-Morris VALIDATING FORM FIELDS  Use the "" or null to check to determine if a form field has information if (document.forms[0].userName.value == "" ) { alert("Name field cannot be empty."); return false; } // end if 10

Copyright © Terry Felke-Morris HANDS-ON PRACTICE 14.8  Page 582  chapter14/formvalidation.html 11

Copyright © Terry Felke-Morris JAVASCRIPT & ACCESSIBILITY  Don’t expect JavaScript to always function for every visitor  Some may have JavaScript disabled  Some may be physically unable to click a mouse  Provide a way for your site to be used if JavaScript is not functioning  Plain text links  contact info 12