Introduction to Programming the WWW I

Slides:



Advertisements
Similar presentations
Introduction to Java 2 Programming
Advertisements

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Introduction to Ajax.
JavaScript and the DOM Les Carr COMP3001 Les Carr COMP3001.
MSc. Publishing on WWW JavaScript. What is JavaScript? A scripting language devised by Netscape Adds functionality to web pages by: Embedding code into.
Tutorial 15 Working with the Event Model. XP Objectives Compare the IE and W3C event models Study how events propagate under both event models Write a.
Graphical User Interface (GUI) Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
JavaScript 101 Lesson 5: Introduction to Events. Lesson Topics Event driven programming Events and event handlers The onClick event handler for hyperlinks.
XP Tutorial 8 New Perspectives on JavaScript, Comprehensive1 Working with the Event Model Creating a Drag-and-Drop Shopping Cart.
INTRODUCTION TO HTML5 Drag and Drop in HTML5. Browsers Support  Currently, most of the major HTML5 desktop web browsers support the new HTML5 drag-and-drop.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 Dynamic Documents With JavaScript.
1 JavaScript: Event Model November 1, 2005 Slides modified from Internet & World Wide Web: How to Program (3rd) edition. By Deitel, Deitel, and Goldberg.
© 2012, Mike Murach & Associates, Inc.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Introduction to Ajax.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 14 - Dynamic HTML: Event Model Outline 14.1 Introduction 14.2 Event onclick 14.3 Event onload 14.4.
Interactive Programming Sec 49 Web Design. Objectives The student will: Understand the difference between movie mode and an interactive program Understand.
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 7.
MACROMEDIA DIRECTOR - LECTURE NOTES -. INTRODUCTION Macromedia Director 8.5 is the best selling multimedia authoring program and leading tool for creating.
Events (Alice In Action, Ch 6) Slides Credit: Joel Adams, Alice in Action CS 120 Lecture September 2012.
Chapter 14: Dynamic HTML: Event Model Presented by: Colbie Brown CS340 Java Web Development Dr. Gloria Carter Love.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.
Review of the DOM Node properties and methods Some ways of accessing nodes Appending, copying and removing nodes Event handling – Inline – Scripting –
Imagine Creating Software Without a Single Line of Code!
 2003 Prentice Hall, Inc. All rights reserved. Chapter 14 - Dynamic HTML: Event Model Outline 14.1 Introduction 14.2 Event onclick 14.3 Event onload 14.4.
The Web Wizard’s Guide To DHTML and CSS Chapter 6 Understanding Events.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 12.
1 Actionscript for Flash by Dr SC Li. 2 Understanding more about instances Symbolsgraphics buttons Movie clips Instances (without names) No interaction.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming Third Edition.
AJAX. Overview of Ajax Ajax is not an API or a programming language Ajax aims to provide more responsive web applications In normal request/response HTTP.
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 13.
7. JavaScript Events. 2 Motto: Do you think I can listen all day to such stuff? –Lewis Carroll.
INTRODUCTION JavaScript can make websites more interactive, interesting, and user-friendly.
4. Events are where it happens! Bear Bibeault Yehuda Katz.
Host Objects: Browsers and the DOM
Introducing DHTML. Goals Understand the concept of DHTML as a tool for creating dynamic content Understand how to use DOM properties to make changes in.
Understanding JavaScript and Coding Essentials Lesson 8.
Events Event Handling in JavaScript SoftUni Team Technical Trainers Software University
CISC 110 Day 6 Introduction to Events. Outline Event-Driven Programming Event Classes Hierarchy –Event Class –Mouse Events –Keyboard Events Registering.
Dr. Ahmet Cengizhan Dirican BIL 374 Internet Technologies 6. Dynamic Documents With JavaScript.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
Implement User Input Windows Development Fundamentals LESSON 2.4A.
JavaScript Events. Understanding Events Events add interactivity between the web page and the user Events add interactivity between the web page and the.
Internet & World Wide Web How to Program, 5/e.  JavaScript events  allow scripts to respond to user interactions and modify the page accordingly  Events.
1 Using jQuery JavaScript & jQuery the missing manual (Second Edition)
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 5 Host Objects: Browsers.
SE-2840 Dr. Mark L. Hornick 1 Dynamic HTML Handling events from DOM objects.
Responding to Events Event Handling in Java
Starting Out with Alice: A Visual Introduction to Programming
Introduction to Event-Driven Programming
Event-driven programming
Introduction to Google Tag Manager
Introduction to Computers
Section 17.1 Section 17.2 Add an audio file using HTML
CT1514 Flash-2.
Introduction to Programming the WWW I
Understand Windows Forms Applications and Console-based Applications
Lesson 1: Buttons and Events – 12/18
Introduction to Events
JavaScript and Events.
Chapter 14 - Dynamic HTML: Event Model
Andrew J. Ko & Brad A. Myers Carnegie Mellon University
Working with the Event Model
Events.
Introduction to jQuery
Event Driven Systems and Modeling
Exercise 1 Modify some parameters in the histogram.js and see what would happen (one by one) 20 in Line 2  in Line 3  in Line 15  .9.
Web Design and Development
JavaScript and Events CS Programming Languages for Web Applications
CHAPTER 6 EVENTS. CHAPTER 6 EVENTS WHAT IS AN EVENT?
JavaScript and Events CS Programming Languages for Web Applications
Brown Bag Seminar Summer 2007
Presentation transcript:

Introduction to Programming the WWW I CMSC 10100-1 Winter 2003 Lecture 13

More on Events Discuss drag and drop Keyboard handling Summary mouse interactions dropping things Keyboard handling Summary review event model highlight browser differences

Main elements of drag and drop mousedown handler for an item turns on movement, mouseup event handlers respond to movement with updating position respond to drop location appropriately

Drag and drop stages drag1.html: Get the listening, mouse right drag2.html: Get the z positioning right book’s example: respond to drop location

Remark on Book’s dragging app Note that we have two event handlers for the mouseup event: onmouseup specified in each div document.onmouseup set during dragging Event bubbling means both handlers get called

Keyboard events Another kind of event triggered by key down, key up Read the key, modifiers from the listener respond accordingly

Event model Browsers can listen for and respond to events Need to set up elements of a page to respond Use your imagination and look at Web pages

Browser differences Propagation and bubbling Window.event vs. local event object cross-browser code is fairly simple, especially with library code