Today’s Announcements` If you have problems with the assignments, don’t be afraid to ask for help Assignment 6 is due and will be graded before the end.

Slides:



Advertisements
Similar presentations
17 HTML, Scripting, and Interactivity Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and.
Advertisements

Microsoft Expression Web-Illustrated Unit J: Creating Forms.
Computer and Communication Fundamental Basic web programming Lecture 8 Rina Zviel-Girshin.
JavaScript and the DOM Les Carr COMP3001 Les Carr COMP3001.
Copyright 2007, Information Builders. Slide 1 Implementing On-Click Functionality With the HTML Layout Painter Larry J Braun Education Specialist June,
Georgia Institute of Technology JavaScript part 2 Barb Ericson Georgia Institute of Technology May 2006.
CIS101 Introduction to Computing Week 12. Agenda Your questions Solutions to practice text Final HTML/JavaScript Project Copy and paste assignment JavaScript:
Chapter 7 © 2001 by Addison Wesley Longman, Inc. 1 Chapter 7 Sebesta: Programming the World Wide Web.
1 The Information School of the University of Washington Oct 30fit review Programming Review INFO/CSE 100, Fall 2006 Fluency in Information Technology.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
JavaScript Lesson 2 TBE 540 F. Fisher. Prerequisites  Before beginning this lesson, the learner must be able to… Create and edit a web page using a text.
CIS101 Introduction to Computing Week 11. Agenda Your questions Copy and Paste Assignment Practice Test JavaScript: Functions and Selection Lesson 06,
Computer Science 103 Chapter 4 Advanced JavaScript.
CIS101 Introduction to Computing Week 12 Spring 2004.
Oct 25 1 The Information School of the University of Washington fit control © 2006 University of Washington Control Flow INFO/CSE 100, Fall 2006.
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.,
Did someone say Music? November 7, Adding MUSIC to a web page: 1. Find your music! 2. A good website is 3. You will.
JavaScript Form Validation
JS: DOM Form Form Object Form Object –The Form object represents an HTML form. –For each instance of a tag in an HTML document, a Form object is created.
CNIT 133 Interactive Web Pags – JavaScript and AJAX Event and Event Handling.
Event Handlers CS101 Introduction to Computing. Learning Goals Learn about event handlers Determine how events are useful in JavaScript Discover where.
The Bean Counter: A JavaScript Program
© 2000 – All Rights Reserved - Page 1 Introduction to JavaScript Programming Part Two.
Fluency with Information Technology INFO100 and CSE100 Katherine Deibel Katherine Deibel, Fluency in Information Technology1.
Intro to JavaScript. Use the tag to tell the browser you are writing JavaScript.
Intro to C++. Getting Started with Microsoft Visual Studios Open Microsoft Visual Studios 2010 Click on file Click on New Project Choose Visual C++ on.
CSS Class 7 Add JavaScript to your page Add event handlers Validate a form Open a new window Hide and show elements Swap images Debug JavaScript.
Announcements Assignment 9 is due Project 2 is due 7/27/04 We will be skipping chapter 22 Test 3 (chapters 18-21) will be on 7/29/04 Tip of the Day : Functions.
Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and check boxes using HTML Add a pull-down.
Lecture # 6 Forms, Widgets and Event Handling. Today Questions: From notes/reading/life? Share Personal Web Page (if not too personal) 1.Introduce: How.
Enhancing Your Web Site—Adding Links Web Page **YOU MUST HAVE COMPLETED THE 1ST 3 WEB PAGES BEFORE YOU CAN DO THIS ONE. **YOU SHOULD HAVE COMPLETED THE.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
CO1552 Web Application Development HTML Forms, Events and an introduction to JavaScript.
1 Chapter 18 Programming Basics When it comes to being precise about an algorithm, a programming language is better than English.
JavaScript Adding active content to websites. Goals Understand structure of JavaScript Understand rules of coding Add active content to WebPages Add functions.
Lecture 10 JavaScript: DOM and Dynamic HTML Boriana Koleva Room: C54
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
Scott Marino MSMIS Summer Session Web Site Design and Authoring Session 8 Scott Marino.
Event JavaScript's interaction with HTML is handled through events that occur when the user or browser manipulates a page. When the page loads, that is.
Fluency with Information Technology INFO100 and CSE100 Katherine Deibel Katherine Deibel, Fluency in Information Technology1.
1 CSC160 Chapter 7: Events and Event Handlers. 2 Outline Event and event handlers onClick event handler onMouseOver event handler onMouseOut event handler.
JavaScript Challenges Answers for challenges
Event Handling. Objectives Using event handlers Simulating events Using event-related methods.
WDMD 170 – UW Stevens Point 1 WDMD 170 Internet Languages eLesson: Variables, Functions and Events (NON-Audio version) © Dr. David C. Gibbs WDMD.
© 2007 D. J. ForemanJS-1 A Light Introduction for Non-programmers JavaScript for Beginners.
HTML FORMS The TEXT Object Presented By: Ankit Gupta.
Introduction to Text Based Coding. We’re learning to explore how text based programming works You will display and enter text into a window You will use.
JavaScript Event Handlers. Introduction An event handler executes a segment of a code based on certain events occurring within the application, such as.
LESSON : EVENTS AND FORM VALIDATION -JAVASCRIPT. EVENTS CLICK.
CSC 121 Computers and Scientific Thinking Fall Event-Driven Programming.
JavaScript Events. Understanding Events Events add interactivity between the web page and the user Events add interactivity between the web page and the.
JavaScript JavaScript is a programming language that web browsers understand. You can use it to make your web pages interactive by: Responding to user.
Third lecture Event 27/2/2016 JavaScript Tutorial.
JavaScript.
D.A. Clements, MLIS, UW Information School
Section 17.1 Section 17.2 Add an audio file using HTML
JAVASCRIPTS AND HTML DOCUMENTS
Web Programming– UFCFB Lecture 17
Event Driven Programming & User Defined Functions
Conditionally Confirming a Submit
The Web Wizard’s Guide To JavaScript
Functions, Regular expressions and Events
Using the Power of XML Personally
Events: Changed and Input
Introduction to Programming and JavaScript
Web Programming and Design
Barb Ericson Georgia Institute of Technology May 2006
Introduction to Web programming
Presentation transcript:

Today’s Announcements` If you have problems with the assignments, don’t be afraid to ask for help Assignment 6 is due and will be graded before the end of class so you can have it to study by Test 2 on chapters 7-10 will be held on Tuesday, 7/13/2004 at 4:00pm Assignments 1-3 will no longer be accepted Last day to turn in assignment 4 for reduced credit The class website has been updated to show the new syllabus Tip of the Day : Reading the chapters before the start of class might help to understand the material

Screen Input and Output The form of © Lawrence Snyder, 2004

Manipulating Data Last time, we saw JS put text ( 4 ) in the source file before finishing the page Now we see JS create buttons and windows, and manipulate data in the finished page

Forms Input & Output in JS are given in forms  Inside tags  Notice type value relationship to text for good results … for good results …

More Forms  Notice type name size relationship to text... Enter data here: Enter data here:...

Radio Control  Notice type name (common) relationship to text... Radio buttons: Left or right.... Radio buttons: Left or right.

Input/Output Windows are input or output based on your point of view …  Programming uses computer’s view It’s obvious that buttons are inputs Windows are inputs, but if the computer puts information in them, they’re outputs HumanComputer Forms define the type of I/O and the processing

Events Cause Processing After drawing a page, browsers sit idle waiting for something to happen … when we give input, it cause events Processing the input is the task of an event handler  Event types onClick onChange onMouseOver In the tag an event handler gives the processing needed for the task using JavaScript

Observe Actions

‘onClick’ Event for Buttons  Event handlers say what to do if event happens … “put ‘Smiley’ in the output window” Emoticons... Emoticons... Event handlers = mini programs

‘onClick’ for Buttons  Notice … ‘ onClick ’ event does the task: place ‘Smiley’ in the output window Emoticons... Emoticons...

x.value  Notice … the value of a text window is the contents of the window x.value Emoticons... Emoticons... window name

‘onChange’ Event  Notice names + is concatenate Adding a smile to <input type="text" name="x2" size=2 onChange="x5.value = x2.value + ')' "> Adding a wink to <input type="text" name="x3" size=2 onChange="x5.value = ';' + x3.value"> Adding a frown to <input type="text" name="x4" size=2 onChange="x5.value = x4.value + '(' "> Makes Adding a smile to <input type="text" name="x2" size=2 onChange="x5.value = x2.value + ')' "> Adding a wink to <input type="text" name="x3" size=2 onChange="x5.value = ';' + x3.value"> Adding a frown to <input type="text" name="x4" size=2 onChange="x5.value = x4.value + '(' "> Makes

Name A Different Window … Adding a smile to <input type="text" name="x2" size=2 onChange="x5.value = x2.value + ')' "> Adding a wink to <input type="text" name="x3" size=2 onChange="x5.value = ';' + x3.value"> Adding a frown to <input type="text" name="x4" size=2 onChange="x5.value = x4.value + '(' "> Makes … Adding a smile to <input type="text" name="x2" size=2 onChange="x5.value = x2.value + ')' "> Adding a wink to <input type="text" name="x3" size=2 onChange="x5.value = ';' + x3.value"> Adding a frown to <input type="text" name="x4" size=2 onChange="x5.value = x4.value + '(' "> Makes "x.value = x2.value + ')' "

Result … Adding a smile to <input type="text" name="x2" size=2 onChange="x5.value = x2.value + ')' "> Adding a wink to <input type="text" name="x3" size=2 onChange="x5.value = ';' + x3.value"> Adding a frown to <input type="text" name="x4" size=2 onChange="x5.value = x4.value + '(' "> Makes … Adding a smile to <input type="text" name="x2" size=2 onChange="x5.value = x2.value + ')' "> Adding a wink to <input type="text" name="x3" size=2 onChange="x5.value = ';' + x3.value"> Adding a frown to <input type="text" name="x4" size=2 onChange="x5.value = x4.value + '(' "> Makes "x.value = x2.value + ')' "

From last lecture...

Conditional Conditionals test if an expression is true or not General form … if ( ) ; For example if (day == "Friday") evening_plan = "party";

If-Then-Else Branch both ways with If-Then-Else if ( ) ; else ; Example … if ((year%4)== 0) { leapYear = true; febDays = febDays+1; } else leapYear = false;

Project 2

Project 2: Exercise

Purple Concentrate

The ultimate goal of the project is to produce the Purple Concentration application.