Chapter 08: Adding Adding Interactivity Interactivity With With Behaviors Behaviors By Bill Bennett Associate Professor MSJC CIS MVC.

Slides:



Advertisements
Similar presentations
Microsoft Expression Web-Illustrated Unit K: Working with Behaviors.
Advertisements

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.
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Essentials for Design JavaScript Level One Michael Brooks
JavaScript and the DOM Les Carr COMP3001 Les Carr COMP3001.
The Web Warrior Guide to Web Design Technologies
Create slices and hotspots Create links in Web pages Create rollovers from slices Create basic animation Add tweening symbol instances to create animation.
Computer Science 103 Chapter 4 Advanced JavaScript.
Macromedia Dreamweaver 4 Advanced Level Course. Add Rollovers Rollovers or mouseovers are possibly the most popular effects used in designing Web pages.
JavaScript 101 Lesson 5: Introduction to Events. Lesson Topics Event driven programming Events and event handlers The onClick event handler for hyperlinks.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Chapter 11 Adding Media and Interactivity. Flash is a software program that allows you to create low-bandwidth, high-quality animations and interactive.
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.,
© 2011 Delmar, Cengage Learning Chapter 11 Adding Media and Interactivity with Flash and Spry.
4.1 JavaScript Introduction
CNIT 133 Interactive Web Pags – JavaScript and AJAX Event and Event Handling.
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
© Cheltenham Computer Training 2001 Macromedia Dreamweaver 4 - Slide No 1 Macromedia Dreamweaver 4 Advanced Level Course.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Dynamic Action with Macromedia Dreamweaver MX Barry Sosinsky Valda Hilley.
Web Technologies Website Development Trade & Industrial Education
Event Handlers CS101 Introduction to Computing. Learning Goals Learn about event handlers Determine how events are useful in JavaScript Discover where.
JavaScript II ECT 270 Robin Burke. Outline JavaScript review Processing Syntax Events and event handling Form validation.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
JavaScript Part 1.
JavaScript Informatics for economists I. Introduction Programming language used in web pages. Simple and easy to use – written in HTML document. Client.
DHTML: Dynamic HTML Internet Technology1. What is DHTML? A collection of enhancements to HTML ► To create dynamic and interactive websites Combination.
Adding User Interactivity – Lesson 51 Adding User Interactivity Lesson 5.
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.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
Website Development with Dreamweaver
XP Dreamweaver 8.0 Tutorial 3 1 Adding Text and Formatting Text with CSS Styles.
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.
Lesson13. JavaScript JavaScript is an interpreted language, designed to function within a web browser. It can also be used on the server.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
JavaScript, jQuery, and Mashups Incorporating JavaScript, jQuery, and other Mashups into existing pages.
Lecture 10 JavaScript: DOM and Dynamic HTML Boriana Koleva Room: C54
44238: Dynamic Web-site Development Client Side Programming Ian Perry Room:C48 Extension:7287
Cs332a_chapt10.ppt CS332A Advanced HTML Programming DHTML Dynamic Hypertext Markup Language A term describing a series of technologies Not a stand-a-lone.
Tutorial 3 Adding and Formatting Text with CSS Styles.
1 CSC160 Chapter 7: Events and Event Handlers. 2 Outline Event and event handlers onClick event handler onMouseOver event handler onMouseOut event handler.
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.
COS 125 DAY 20. Agenda Assignment 8 not corrected yet Assignment 9 posted  Due April 16 New course time line Discussion on Scripts 
JavaScript Defined DOM (Document Object Model) General Syntax Body vs. Head Variables Math & Logic Selection Functions & Events Loops Animation Getting.
CIS 3.5 Lecture 2.3 "Introduction to JavaScript".
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 14 Key Concepts 1 Copyright © Terry Felke-Morris.
Chapter 11 Adding Media and Interactivity. Chapter 11 Lessons Introduction 1.Add and modify Flash objects 2.Add rollover images 3.Add behaviors 4.Add.
1 Creating Links Lesson 2. 2 In the center column type : Home | Order Now | Contact Us This is the navigation button which will link to the other pages.
Document Object Model Nasrullah. DOM When a page is loaded,browser creates a Document Object Model of the Page.
LESSON : EVENTS AND FORM VALIDATION -JAVASCRIPT. EVENTS CLICK.
1 Lesson 6 Introducing JavaScript HTML and JavaScript BASICS, 4 th Edition.
Microsoft Expression Web 3 Chapter 6 Adding Interactivity.
JavaScript and Ajax (JavaScript Environment) Week 6 Web site:
Creating Web Pages with Links, Images, and Embedded Style Sheets
Adding Interactivity Comp 140 Fall Web 2.0 Major change in internet usage –From mostly static pages Text Graphics Simple links –To new paradigm.
Web Programming Java Script-Introduction. What is Javascript? JavaScript is a scripting language using for the Web. JavaScript is a programming language.
Copyright © Terry Felke-Morris Web Development & Design Foundations with HTML5 8 th Edition CHAPTER 14 KEY CONCEPTS 1 Copyright.
Introduction to.
Objective % Select and utilize tools to design and develop websites.
Using DHTML to Enhance Web Pages
Microsoft® Office FrontPage® 2003 Training
Section 17.1 Section 17.2 Add an audio file using HTML
Web Development & Design Foundations with HTML5 7th Edition
Objective % Select and utilize tools to design and develop websites.
DHTML Javascript Internet Technology.
DHTML Javascript Internet Technology.
Using Cascading Style Sheets (CSS)
JavaScript and Ajax (JavaScript Events)
Presentation transcript:

Chapter 08: Adding Adding Interactivity Interactivity With With Behaviors Behaviors By Bill Bennett Associate Professor MSJC CIS MVC

Behaviors Definition (as it relates to Web design) : – Behaviors are a collection of pre-written routines designed to provide user interaction within a Web page. Many GUI-based Web design programs, like Expression Web, include and/or allow for the importing and creation of Behaviors that can be added to your Web pages. Example behaviors: pop-up windows, rollover effects; button actions; changing properties of elements, styles, or objects in a Web page, and changing content in a Web page; to name a few. Behaviors are created using a client-side scripting language like JavaScript (preferred) or VBScript

The Big Picture HTML defines the structure of your Web pages – HTML is a Markup language CSS defines the look of your Web pages Scripting languages define the control logic of your Web pages – Behaviors or functions are added to a Web page by using a scripting language

Client-Side Scripting Definition: – Client-side scripting means that the scripting code is processed by the clients user agent (Web browser) Popular client-side scripting languages: – JavaScript Open Source Works in all Web browsers Most frequently used client-side scripting language of Web developers – VBScript Proprietary Works only in MS Internet Explorer

JavaScript It IS a Scripting Language – Doesnt need to be compiled – Runs on all operating systems – Object-based language – Web Browser must have JavaScript interpreter enabled – It is similar to, but not the same as, JAVA It IS NOT a Programming Language – Must be compiled first – Compiled to work on a specific operating system – Object-oriented language – Has more functionality – Languages include: JAVA, C++, and C# (pronounced C-sharp)

Scripting Basics Scripts can be: imported, linked to, or embedded in HTML pages JavaScript IS case-sensitive! JavaScript functions can be embedded in the section of an HTML page... function showMessage() { window.alert(Hello World); }... Then triggered by events added inside of HTML tags

Scripting Basics Behaviors consist of two components: 1.Events Some activity that occurs on a Web page, like a user moves a mouse over a button or clicks on an image 2.Actions Are triggered by events The activity that needs to occur Changing a property value Performing a mathematical calculation Opening a new Web browser window Etc.

Behaviors Panel Use Expression Webs Behaviors panel to add a behavior to your HTML page Adding an Expression Web behavior writes the code for the JavaScript function in your documents section and places the chosen Event type inside of the selected HTML element Click here to add a new behavior Behaviors currently applied to selected tag Selected tag

Often Used Event Types onClick onDblClick onMouseDown onMouseUp onMouseOver onMouseOut onFocus onBlur onLoad onUnload

Expression Web Behaviors Call Script Change Property Change Property Restore Go To URL Jump Menu Jump Menu Go Open Browser Window Play Sound Popup Message Preload Images Set Text Swap Image Swap Image Restore Behaviors panel Click on Insert

Adding the Swap Image Behavior Select the image you want to add the behavior to Open the Behaviors panel from the Panels menu Next click the Insert button located in the top left of the Behaviors panel and choose Swap Image The selected tag displays in the Behaviors panel

Swap Images Dialog Box Adds code to restore original image on mouseout event. Selected tag that behavior will be applied to. Choosing this check box adds code to the section and the tag which loads the swap image into a Web browser s memory when the page is loaded; it creates a smoother roll over effect. Location and name of the swap image file. The circle shows the other elements in your document. It helps to add the ID attribute to your tags to make it easier to find the right tag in this list. To do this, select the tag and type a name in the ID field of the Tag Properties panel. This is where you add the behavior to your tag

End of Chapter Exercise 1.Copy each page you created in Chapter07 (Home, About Us, Solutions, Support, and Contact Us) and the styles.css file to your Chapter08 folder. 2.In the Chapter08 folder open the default.htm file 3.In the space where the navigation menu resides, replace each textual hyperlink with the appropriate image file (nav_home1.png, nav_aboutus1.png, nav_oursolutions1.png, nav_support1.png, nav_contactus1.png). 4.Make each nav image a hyperlink by right-clicking on the image, choosing Hyperlink Properties and pointing to the appropriate html file, i.e. the nav_home1.png should have an HREF=default.htm added to its hyperlink. 5.Select each image individually and attach the Swap Image behavior. Set the source of each images Swap Image URL to the second image provided (nav_home2.png, nav_aboutus2.png, nav_oursolutions2.png, nav_support2.png, nav_contactus2.png) 6.Repeat the process for the other pages in the site. 7.Publish your chapter08 folder and me your hyperlink for this assignment.