Chapter 14. Dynamic HTML: Event Model

Size: px
Start display at page:

Download "Chapter 14. Dynamic HTML: Event Model"

Transcription

1 Chapter 14. Dynamic HTML: Event Model DHTML s event model lets scripts respond to user actions. Event onclick The onclick event fires when the user clicks the mouse. The following causes the enclosed script to be executed when the element with id element_id is clicked. <script type = text/javascript for = element_id event = onclick > </script> We get inline scripting by including onclick = script in the opening tag of an element e.g., <p onclick = "alert( 'second' )">p2</p> 212

2 Example: <html> <head> <title>onclick Example</title> <script type = "text/javascript" for = "p1" event = "onclick"> alert( "first" ); </script> </head> <body> <p id = "p1">p1</p> <p onclick = "alert( 'second' )">p2</p> </body> </html> The rendering is: p1 p2 When p1 is clicked, an alert box appears with text first. When p2 is clicked, an alert box appears with text second. The alert boxes may be raised and dismissed any number of times. 213

3 The event Object, and Tracking the Mouse with Event onmouseover The event object contains information about the triggered event. Some of the properties of event are: type is the name of the event that fired. srcelement is a reference to the object that fired the event. This object has its usual properties e.g., event.srcelement.tagname propertyname is the name of the property that changed in this event. offsetx / offsety are the coordinates of the mouse cursor relative to the object that fired the event. x / y are the coordinates of the mouse cursor relative to the parent element of the element that fired the event. screenx / screeny are the coordinates of the mouse cursor on the screen coordinate system. clientx / clienty are the coordinates of the mouse cursor within the client area (the active area where the page is displayed). altkey is true if the ALT key was pressed when the event fired. Similar properties: ctrlkley and shiftkey. button gives the mouse button pressed: 1 (left), 2 (right), 3 (left and right), 4 (middle), 5 (left and middle), 6 (right and middle), or 7 (all three). See Figure 14.5, p. 464 in the text for more. 214

4 Event onmousemove fires constantly when the mouse is in motion. Example: <html> <head> <title>onmousemove example</title> <script type = "text/javascript"> function updatemousecoordinates() { coordinates.innertext = event.srcelement.tagname + " (" + event.offsetx + ", " + event.offsety + ")"; } </script> </head> <body onmousemove = "updatemousecoordinates()"> <span id = "coordinates">(0, 0)</span><br> <img src = "ellipse.bmp" style ="position: absolute; top: 100; left: 100"> </body> 215

5 When the mouse cursor is not over the image, the coordinates are in the body s coordinate system. When it s over the image, the coordinates are in the image s coordinate system. 216

6 Rollovers with onmouseover and onmouseout When the mouse cursor moves over an element, event onmouseover is fired for that element. When the mouse cursor leaves an element, event onmouseout is fired for that element. Handling these events, we can achieve a rollover effect: the text of an element changes as the mouse moves over and out of it. The document object has predefined event-handler slots for certain events. You can associate an event handler with an event by assigning its name to the corresponding slot: document.event_handler_slot = event_handler; Then, when the corresponding event happens, event_handler is invoked. The name event_handler_slot is usually the lowercase event name. Examples: document.onmouseover = moverhandler; document.onmouseout = mouthandler; Here moverhandler and mouthandler are event handlers for the events onmouseover and onmouseout written by the programmer. The following is needed for the next example. We can create a new image object and set its src property to the file containing the image with variable_name = new Image(); variable_name.src = file_name ; Creating an image object lets us pre-load the desired image rather than delaying download to when the image is displayed. 217

7 Example: Here we define in the body a 2 2 table (where we show the id s in parentheses): 1 (E0) 2 (E1) 3 (E2) 4 (E3) In the script, we initialize two array variables: ar1 = [ one, two, three, four ], ar2 = [ I, II, III, IV ] When the mouse cursor moves over the cell with id Ei, the numeral word ar1[ i ] appears in the cell. When the mouse cursor moves out of the cell, the Roman numeral ar2[ i ] appears in it. The name (a string) of the of the source element of the event is given by event.srcelement.id For this example, we use all but the first character of this as a subscript into either the ar1 or the ar2 array: ar1[ event.srcelement.id.substr( 1 ) ] Both event handlers first check whether the event was the image object (with id first ). If not, they check that the source element of the event has an id (that the id property is not undefined): if ( event.srcelement.id ) We must do this since both events (onmouseover and onmouseout) fire for any element, but we process these events only for certain elements (those with id s). 218

8 <html> <head> <title>rollover Example</title> <script type = "text/javascript"> var image1 = new Image(), image2 = new Image(), ar1 = [ "one", "two", "three", "four" ], ar2 = [ "I", "II", "III", "IV" ]; image1.src = "ellipse.bmp"; image2.src = "rectangle.bmp"; document.onmouseover = moverhandler; document.onmouseout = mouthandler; function moverhandler() { if ( event.srcelement.id == "first" ) event.srcelement.src = image2.src; else if (event.srcelement.id ) event.srcelement.innertext = ar1[ event.srcelement.id.substr(1) ]; } function mouthandler() { if ( event.srcelement.id == "first" ) event.srcelement.src = image1.src; else if (event.srcelement.id ) event.srcelement.innertext = ar2[ event.srcelement.id.substr(1) ]; } </script> </head> Continued next page 219

9 Continued from previous page <body> <img src = "ellipse.bmp" id = "first"> <table style = "width: 30%; text-align: center"> <caption>some Numbers</caption> <tr style = "text-align: center"> <td id = E0 style= "width: 15%">1</td> <td id = E1 style= "width: 15%">2</td> </tr> <tr style = "text-align: center"> <td id = E2 style= "width: 15%">3</td> <td id = E3 style= "width: 15%">4</td> </tr> </table> </body> </html> 220

10 When the mouse cursor enters the area with the image of the ellipse, the image of a rectangle appears. When the mouse cursor leaves the area with the image of the rectangle, the image of ellipse re-appears. These images keep swapping: when the mouse cursor is in the area, we have a square; when it s out, we have am ellipse. When the mouse cursor enters a cell with one of the numbers, say, 2, it is replaced with its number word, two. When the mouse cursor leaves this cell, the Roman number II appears. Two and II keep swapping: when the mouse cursor is in the cell, we have two; when it s out, we have II. But 2 never re-appears. 221

11 Error Handling with onerror Scripts can use the onerror event to execute specialized errorhandling code in place of the error dialog presented by browsers. Suppose we define a function errorhandler as the handler for the onerror event: document.onerror = errorhandler; The header of this function should have three arguments (the names are up to you): function errorhandler( errtype, errurl, errlinenum ) Here errtype (a string) is the type of the error, errurl (a string) is URL of the page where the error occurred, and errlinenum (an integer) is the number of the line where the error occurred. It returns true to indicate that it has handled the error. If it returns false, the default response (an error dialog) occurs. The following is needed for the next example. We can cause text to appear in the status bar at the bottom of the browser window by assigning it to window.status. 222

12 Example We define an error handler that writes to the status bar the type of error and the line and URL where it occurred. We force an error by associating a call to an undefined function with the onclick event of a paragraph element. <html> <head> <title>onerror event</title> <script type = "text/javascript"> document.onerror = errorhandler; function errorhandler( errtype, errurl, errlinenum ) { window.status = "Error: " + errtype + " on line " + errlinenum + " of " + errurl; return true; } </script> </head> <body> <p onclick = "dothis()">click here</p> </body> </html> 223

13 When the text Click here of the paragraph is clicked, we get: To make sure this example works, open the Control Panel and select Internet Options. Click the Advanced tab. Under Browsing, make sure the Disable script debugging check box is not selected. 224

14 Event Bubbling Suppose an element and one of its ancestors both respond to a given event. Then, without provision to the contrary, the event bubbles up from the element to the ancestor. Suppose you want the event to be handled by the given element s event handler and not by that of the ancestor. Then you can set the event s cancelbubble property: event.cancelbubble = true; Example: Here the document has a handler for event onclick: document.onclick = documentclick; Both paragraphs in the body use paragraphclick( b_value ), defined in the script, as their handler for onclick. One has true as the argument, which cancels bubbling. The other has false, permitting bubbling. 225

15 <html> <head> <title>event Bubbling</title> <script type = "text/javascript"> function documentclick() { alert( "You clicked in the document" ); } function paragraphclick( value ) { alert( "You clicked the text" ); if ( value ) event.cancelbubble = true; } document.onclick = documentclick; </script> </head> <body> <p onclick = "paragraphclick( false )"> Click here!</p> <p onclick = "paragraphclick( true )"> Click here, too!</p> </body> </html> 226

16 The following shows the screen after the text Click here! was clicked, and after the alert box stating You clicked the text was dismissed. The onclick event has bubbled up from the paragraph to the document. If the text Click here, too! is clicked, then an alert box stating You clicked the text again appears. But now, when this alert box is dismissed, no further alert box appears bubbling up to the document has been canceled. More DHTML Events See Figure 14.10, pp , in the text for descriptions of the remaining events, not discussed in detail in Chapter

Chapter 14 - Dynamic HTML: Event Model

Chapter 14 - Dynamic HTML: Event Model Chapter 1 - Dynamic HTML: Event Model Outline 1.1 Introduction 1.2 Event onclick 1.3 Event onload 1. Error Handling with onerror 1.5 Tracking the Mouse with Event onmousemove 1.6 Rollovers with onmouseover

More information

Introduzione Modello degli Eventi Manipolare eventi Usare l oggetto event per gestire le azioni utente Riconoscere e gestire gli eventi principali

Introduzione Modello degli Eventi Manipolare eventi Usare l oggetto event per gestire le azioni utente Riconoscere e gestire gli eventi principali Sommario Introduzione Evento onclick Evento onload Gestione errori con onerror Gestione mouse con l evento onmousemove Elaborazione di form con onfocus e onblur onsubmit e onreset Altri eventi DHTML 1

More information

Events: another simple example

Events: another simple example Internet t Software Technologies Dynamic HTML part two IMCNE A.A. 2008/09 Gabriele Cecchetti Events: another simple example Every element on a web page has certain events which can trigger JavaScript functions.

More information

JavaScript and XHTML. Prof. D. Krupesha, PESIT, Bangalore

JavaScript and XHTML. Prof. D. Krupesha, PESIT, Bangalore JavaScript and XHTML Prof. D. Krupesha, PESIT, Bangalore Why is JavaScript Important? It is simple and lots of scripts available in public domain and easy to use. It is used for client-side scripting.

More information

Introduction to using HTML to design webpages

Introduction to using HTML to design webpages Introduction to using HTML to design webpages #HTML is the script that web pages are written in. It describes the content and structure of a web page so that a browser is able to interpret and render the

More information

Overview. Event Handling. Introduction. Reviewing the load Event. Event mousemove and the event Object. Rollovers with mouseover and mouseout

Overview. Event Handling. Introduction. Reviewing the load Event. Event mousemove and the event Object. Rollovers with mouseover and mouseout Overview Introduction Reviewing the load Event Event mousemove and the event Object Rollovers with mouseover and mouseout Form processing with focus, blur, submit, reset More events Introduction The Document

More information

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2017)

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2017) COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2017) RAMANA ISUKAPALLI RAMANA@CS.COLUMBIA.EDU 1 LECTURE-1 Course overview See http://www.cs.columbia.edu/~ramana Overview of HTML Formatting, headings,

More information

Use Web Event Bubbling

Use Web Event Bubbling Use Web Event Bubbling Contents Introduction... 1 Use event bubbling... 1 Test event bubbling... 9 Feedbacks... 11 Introduction Every element in a web page has a parent element. For example, a button s

More information

JavaScript: Events, the DOM Tree, jquery and Timing

JavaScript: Events, the DOM Tree, jquery and Timing JavaScript: Events, the DOM Tree, jquery and Timing CISC 282 October 11, 2017 window.onload Conflict Can only set window.onload = function once What if you have multiple files for handlers? What if you're

More information

Lesson 5: Introduction to Events

Lesson 5: Introduction to Events JavaScript 101 5-1 Lesson 5: Introduction to Events OBJECTIVES: In this lesson you will learn about Event driven programming Events and event handlers The onclick event handler for hyperlinks The onclick

More information

EVENT-DRIVEN PROGRAMMING

EVENT-DRIVEN PROGRAMMING LESSON 13 EVENT-DRIVEN PROGRAMMING This lesson shows how to package JavaScript code into self-defined functions. The code in a function is not executed until the function is called upon by name. This is

More information

Using Dreamweaver CC. 6 Styles in Websites. Exercise 1 Linked Styles vs Embedded Styles

Using Dreamweaver CC. 6 Styles in Websites. Exercise 1 Linked Styles vs Embedded Styles Using Dreamweaver CC 6 So far we have used CSS to arrange the elements on our web page. We have also used CSS for some limited formatting. In this section we will take full advantage of using CSS to format

More information

Title: Jan 29 11:03 AM (1 of 23) Note that I have now added color and some alignment to the middle and to the right on this example.

Title: Jan 29 11:03 AM (1 of 23) Note that I have now added color and some alignment to the middle and to the right on this example. Title: Jan 29 11:03 AM (1 of 23) Note that I have now added color and some alignment to the middle and to the right on this example. Sorry about these half rectangle shapes a Smartboard issue today. To

More information

A Balanced Introduction to Computer Science, 3/E

A Balanced Introduction to Computer Science, 3/E A Balanced Introduction to Computer Science, 3/E David Reed, Creighton University 2011 Pearson Prentice Hall ISBN 978-0-13-216675-1 Chapter 4 JavaScript and Dynamic Web Pages 1 Static vs. Dynamic Pages

More information

LECTURE-3. Exceptions JS Events. CS3101: Programming Languages: Javascript Ramana Isukapalli

LECTURE-3. Exceptions JS Events. CS3101: Programming Languages: Javascript Ramana Isukapalli LECTURE-3 Exceptions JS Events 1 EXCEPTIONS Syntax and usage Similar to Java/C++ exception handling try { // your code here catch (excptn) { // handle error // optional throw 2 EXCEPTIONS EXAMPLE

More information

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application.

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application. Extra notes - Client-side Design and Development Dr Nick Hayward HTML - Basics A brief introduction to some of the basics of HTML. Contents Intro element add some metadata define a base address

More information

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21 Table of Contents Chapter 1 Getting Started with HTML 5 1 Introduction to HTML 5... 2 New API... 2 New Structure... 3 New Markup Elements and Attributes... 3 New Form Elements and Attributes... 4 Geolocation...

More information

CSE 154 LECTURE 10: MORE EVENTS

CSE 154 LECTURE 10: MORE EVENTS CSE 154 LECTURE 10: MORE EVENTS Problems with reading/changing styles click Me HTML window.onload = function() { document.getelementbyid("clickme").onclick = biggerfont; };

More information

CSI 3140 WWW Structures, Techniques and Standards. Browsers and the DOM

CSI 3140 WWW Structures, Techniques and Standards. Browsers and the DOM CSI 3140 WWW Structures, Techniques and Standards Browsers and the DOM Overview The Document Object Model (DOM) is an API that allows programs to interact with HTML (or XML) documents In typical browsers,

More information

Web Development & Design Foundations with HTML5

Web Development & Design Foundations with HTML5 1 Web Development & Design Foundations with HTML5 CHAPTER 14 A BRIEF LOOK AT JAVASCRIPT Copyright Terry Felke-Morris 2 Learning Outcomes In this chapter, you will learn how to: Describe common uses of

More information

Web Development & Design Foundations with HTML5, 8 th Edition Instructor Materials Chapter 14 Test Bank

Web Development & Design Foundations with HTML5, 8 th Edition Instructor Materials Chapter 14 Test Bank Multiple Choice. Choose the best answer. 1. JavaScript can be described as: a. an object-oriented scripting language b. an easy form of Java c. a language created by Microsoft 2. Select the true statement

More information

CST272 Getting Started Page 1

CST272 Getting Started Page 1 CST272 Getting Started Page 1 1 2 3 4 5 6 8 Introduction to ASP.NET, Visual Studio and C# CST272 ASP.NET Static and Dynamic Web Applications Static Web pages Created with HTML controls renders exactly

More information

Web Design and Application Development

Web Design and Application Development Yarmouk University Providing Fundamental ICT Skills for Syrian Refugees (PFISR) Web Design and Application Development Dr. Abdel-Karim Al-Tamimi altamimi@yu.edu.jo Lecture 02 A. Al-Tamimi 1 Lecture Overview

More information

Catching Events. Bok, Jong Soon

Catching Events. Bok, Jong Soon Catching Events Bok, Jong Soon Jongsoon.bok@gmail.com www.javaexpert.co.kr What Is an Event? Events Describe what happened. Event sources The generator of an event Event handlers A function that receives

More information

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2) What is JavaScript?

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2) What is JavaScript? Web Development & Design Foundations with HTML5 Ninth Edition Chapter 14 A Brief Look at JavaScript and jquery Slides in this presentation contain hyperlinks. JAWS users should be able to get a list of

More information

By the end of this section of the practical, the students should be able to:

By the end of this section of the practical, the students should be able to: By the end of this section of the practical, the students should be able to: Write JavaScript to generate HTML Create simple scripts which include input and output statements, arithmetic, relational and

More information

Creating Accessible Web Sites with EPiServer

Creating Accessible Web Sites with EPiServer Creating Accessible Web Sites with EPiServer Abstract This white paper describes how EPiServer promotes the creation of accessible Web sites. Product version: 4.50 Document version: 1.0 2 Creating Accessible

More information

PIC 40A. Midterm 1 Review

PIC 40A. Midterm 1 Review PIC 40A Midterm 1 Review XHTML and HTML5 Know the structure of an XHTML/HTML5 document (head, body) and what goes in each section. Understand meta tags and be able to give an example of a meta tags. Know

More information

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh Web Programming and Design MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh Plan for the next 5 weeks: Introduction to HTML tags, creating our template file Introduction to CSS and style

More information

Insert/Edit Image. Overview

Insert/Edit Image. Overview Overview The tool is available on the default toolbar for the WYSIWYG Editor. The Images Gadget may also be used to drop an image on a page and will automatically spawn the Insert/Edit Image modal. Classic

More information

Using Dreamweaver CS6

Using Dreamweaver CS6 Using Dreamweaver CS6 7 Dynamic HTML Dynamic HTML (DHTML) is a term that refers to website that use a combination of HTML, scripting such as JavaScript, CSS and the Document Object Model (DOM). HTML and

More information

recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language (HTML)

recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language (HTML) HTML & Web Pages recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language (HTML) HTML specifies formatting within a page using tags in its

More information

Html basics Course Outline

Html basics Course Outline Html basics Course Outline Description Learn the essential skills you will need to create your web pages with HTML. Topics include: adding text any hyperlinks, images and backgrounds, lists, tables, and

More information

LECTURE-2. Functions review HTML Forms. Arrays Exceptions Events. CS3101: Scripting Languages: Javascript Ramana Isukapalli

LECTURE-2. Functions review HTML Forms. Arrays Exceptions Events. CS3101: Scripting Languages: Javascript Ramana Isukapalli LECTURE-2 Functions review HTML Forms Arrays Exceptions Events 1 JAVASCRIPT FUNCTIONS, REVIEW Syntax function (params) { // code Note: Parameters do NOT have variable type. 1. Recall: Function

More information

Web Programming/Scripting: JavaScript

Web Programming/Scripting: JavaScript CS 312 Internet Concepts Web Programming/Scripting: JavaScript Dr. Michele Weigle Department of Computer Science Old Dominion University mweigle@cs.odu.edu http://www.cs.odu.edu/~mweigle/cs312-f11/ 1 Outline!

More information

(Refer Slide Time: 01:40)

(Refer Slide Time: 01:40) Internet Technology Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture No #25 Javascript Part I Today will be talking about a language

More information

Using Dreamweaver CS6

Using Dreamweaver CS6 6 So far we have used CSS to arrange the elements on our web page. We have also used CSS for some limited formatting. In this section we will take full advantage of using CSS to format our web site. Just

More information

Photo from DOM

Photo from  DOM Photo from http://www.flickr.com/photos/emraya/2861149369/ DOM 2 DOM When a browser reads an HTML file, it must interpret the file and render it onscreen. This process is sophisticated. Fetch Parse Flow

More information

CSC 121 Computers and Scientific Thinking

CSC 121 Computers and Scientific Thinking CSC 121 Computers and Scientific Thinking Fall 2005 HTML and Web Pages 1 HTML & Web Pages recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language

More information

Website Development with HTML5, CSS and Bootstrap

Website Development with HTML5, CSS and Bootstrap Contact Us 978.250.4983 Website Development with HTML5, CSS and Bootstrap Duration: 28 hours Prerequisites: Basic personal computer skills and basic Internet knowledge. Course Description: This hands on

More information

JavaScript is described in detail in many books on the subject, and there is excellent tutorial material at

JavaScript is described in detail in many books on the subject, and there is excellent tutorial material at JavaScript (last updated April 15, 2013: LSS) JavaScript is a scripting language, specifically for use on web pages. It runs within the browser (that is to say, it is a client- side scripting language),

More information

Chapter 5. Introduction to XHTML: Part 2

Chapter 5. Introduction to XHTML: Part 2 Chapter 5. Introduction to XHTML: Part 2 Tables Attributes of the table element: border: width of the table border in pixels (0 makes all lines invisible) align: horizontal alignment (left, center, or

More information

HTML and CSS COURSE SYLLABUS

HTML and CSS COURSE SYLLABUS HTML and CSS COURSE SYLLABUS Overview: HTML and CSS go hand in hand for developing flexible, attractively and user friendly websites. HTML (Hyper Text Markup Language) is used to show content on the page

More information

Fundamentals of Website Development

Fundamentals of Website Development Fundamentals of Website Development CSC 2320, Fall 2015 The Department of Computer Science Events handler Element with attribute onclick. Onclick with call function Function defined in your script or library.

More information

Dynamic documents with JavaScript

Dynamic documents with JavaScript Dynamic documents with JavaScript Introduction Informally, a dynamic XHTML document is an XHTML document that, in some way, can be changed while it is being displayed by a browser. Dynamic XHTML is not

More information

A HTML document has two sections 1) HEAD section and 2) BODY section A HTML file is saved with.html or.htm extension

A HTML document has two sections 1) HEAD section and 2) BODY section A HTML file is saved with.html or.htm extension HTML Website is a collection of web pages on a particular topic, or of a organization, individual, etc. It is stored on a computer on Internet called Web Server, WWW stands for World Wide Web, also called

More information

New Perspectives on Creating Web Pages with HTML. Tutorial Objectives

New Perspectives on Creating Web Pages with HTML. Tutorial Objectives New Perspectives on Creating Web Pages with HTML Tutorial 9: Working with JavaScript Objects and Events 1 Tutorial Objectives Learn about form validation Study the object-based nature of the JavaScript

More information

EECS1012. Net-centric Introduction to Computing. Lecture JavaScript Events

EECS1012. Net-centric Introduction to Computing. Lecture JavaScript Events EECS 1012 Net-centric Introduction to Computing Lecture JavaScript Events Acknowledgements Contents are adapted from web lectures for Web Programming Step by Step, by M. Stepp, J. Miller, and V. Kirst.

More information

ITEC447 Web Projects CHAPTER 9 FORMS 1

ITEC447 Web Projects CHAPTER 9 FORMS 1 ITEC447 Web Projects CHAPTER 9 FORMS 1 Getting Interactive with Forms The last few years have seen the emergence of the interactive web or Web 2.0, as people like to call it. The interactive web is an

More information

Events. Mendel Rosenblum. CS142 Lecture Notes - Events

Events. Mendel Rosenblum. CS142 Lecture Notes - Events Events Mendel Rosenblum DOM communicates to JavaScript with Events Event types: Mouse-related: mouse movement, button click, enter/leave element Keyboard-related: down, up, press Focus-related: focus in,

More information

Want to add cool effects like rollovers and pop-up windows?

Want to add cool effects like rollovers and pop-up windows? Chapter 10 Adding Interactivity with Behaviors In This Chapter Adding behaviors to your Web page Creating image rollovers Using the Swap Image behavior Launching a new browser window Editing your behaviors

More information

Place User-Defined Functions in the HEAD Section

Place User-Defined Functions in the HEAD Section JavaScript Functions Notes (Modified from: w3schools.com) A function is a block of code that will be executed when "someone" calls it. In JavaScript, we can define our own functions, called user-defined

More information

A Balanced Introduction to Computer Science, 3/E

A Balanced Introduction to Computer Science, 3/E A Balanced Introduction to Computer Science, 3/E David Reed, Creighton University 2011 Pearson Prentice Hall ISBN 978-0-13-216675-1 Chapter 2 HTML and Web Pages 1 HTML & Web Pages recall: a Web page is

More information

710 Index Attributes, 127 action attribute, 263 assigning, bottom attribute, domain name attribute, 481 expiration date attribute, 480 8

710 Index Attributes, 127 action attribute, 263 assigning, bottom attribute, domain name attribute, 481 expiration date attribute, 480 8 INDEX Symbols = (assignment operator), 56 \ (backslash), 33 \b (backspace), 33 \" (double quotation mark), 32 \e (escape), 33 \f (form feed), 33

More information

Fundamentals of Web Technologies. Agenda: HTML Links 5/22/2017. HTML Links - Hyperlinks HTML Lists

Fundamentals of Web Technologies. Agenda: HTML Links 5/22/2017. HTML Links - Hyperlinks HTML Lists ITU 07204: Fundamentals of Web Technologies Lecture 6: HTML Links & Lists Dr. Lupiana, D FCIM, Institute of Finance Management Semester 2 Agenda: HTML Links - Hyperlinks HTML Lists 2 HTML Links A hyperlink

More information

JAVASCRIPT. Computer Science & Engineering LOGO

JAVASCRIPT. Computer Science & Engineering LOGO JAVASCRIPT JavaScript and Client-Side Scripting When HTML was first developed, Web pages were static Static Web pages cannot change after the browser renders them HTML and XHTML could only be used to produce

More information

JSF - H:INPUTSECRET. Class name of a validator that s created and attached to a component

JSF - H:INPUTSECRET. Class name of a validator that s created and attached to a component http://www.tutorialspoint.com/jsf/jsf_inputsecret_tag.htm JSF - H:INPUTSECRET Copyright tutorialspoint.com The h:inputsecret tag renders an HTML input element of the type "password". JSF Tag

More information

CITS3403 Agile Web Development Semester 1, 2018

CITS3403 Agile Web Development Semester 1, 2018 Javascript Event Handling CITS3403 Agile Web Development Semester 1, 2018 Event Driven Programming Event driven programming or event based programming programming paradigm in which the flow of the program

More information

Certified HTML5 Developer VS-1029

Certified HTML5 Developer VS-1029 VS-1029 Certified HTML5 Developer Certification Code VS-1029 HTML5 Developer Certification enables candidates to develop websites and web based applications which are having an increased demand in the

More information

New Media Production Lecture 7 Javascript

New Media Production Lecture 7 Javascript New Media Production Lecture 7 Javascript Javascript Javascript and Java have almost nothing in common. Netscape developed a scripting language called LiveScript. When Sun developed Java, and wanted Netscape

More information

Deccansoft Software Services

Deccansoft Software Services Deccansoft Software Services (A Microsoft Learning Partner) HTML and CSS COURSE SYLLABUS Module 1: Web Programming Introduction In this module you will learn basic introduction to web development. Module

More information

FBCA-03 April Introduction to Internet and HTML Scripting (New Course)

FBCA-03 April Introduction to Internet and HTML Scripting (New Course) Seat No. : FBCA-03 April-2007 105-Introduction to Internet and HTML Scripting (New Course) Time : 3 Hours] [Max. Marks : 70 Instructions : (1) Figures to the right indicate marks allotted to that questions.

More information

Mouse-over Effects. Text based buttons

Mouse-over Effects. Text based buttons Mouse-over Effects Text based buttons Mouse-over Effects: Text based buttons. The purpose of this pamphlet is to give you a simple and quick example that illustrates the use of text based mouse-over effects

More information

Introduction to DHTML

Introduction to DHTML Introduction to DHTML HTML is based on thinking of a web page like a printed page: a document that is rendered once and that is static once rendered. The idea behind Dynamic HTML (DHTML), however, is to

More information

The first sample. What is JavaScript?

The first sample. What is JavaScript? Java Script Introduction JavaScript is the most popular scripting language on the internet, and works in all major browsers, such as Internet Explorer, Firefox, Chrome, Opera, and Safari. In this lecture

More information

Programming Lab 1 (JS Hwk 3) Due Thursday, April 28

Programming Lab 1 (JS Hwk 3) Due Thursday, April 28 Programming Lab 1 (JS Hwk 3) Due Thursday, April 28 Lab You may work with partners for these problems. Make sure you put BOTH names on the problems. Create a folder named JSLab3, and place all of the web

More information

CS Multimedia and Communications REMEMBER TO BRING YOUR MEMORY STICK TO EVERY LAB!

CS Multimedia and Communications REMEMBER TO BRING YOUR MEMORY STICK TO EVERY LAB! CS 1033 Multimedia and Communications REMEMBER TO BRING YOUR MEMORY STICK TO EVERY LAB! Lab 06: Introduction to KompoZer (Website Design - Part 3 of 3) Lab 6 Tutorial 1 In this lab we are going to learn

More information

COMP519: Web Programming Lecture 4: HTML (Part 3)

COMP519: Web Programming Lecture 4: HTML (Part 3) COMP519: Web Programming Lecture 4: HTML (Part 3) Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University of Liverpool Contents 1 HTML

More information

MAX 2006 Beyond Boundaries

MAX 2006 Beyond Boundaries Building a Spry Page MAX 2006 Beyond Boundaries Donald Booth Dreamweaver QE/Spry Team Adobe Systems, Inc. 1. Attach CSS/JS 1. Browse to the Assets folder and attach max.css. 2. Attach the 2 js files.

More information

Task 1. Set up Coursework/Examination Weights

Task 1. Set up Coursework/Examination Weights Lab02 Page 1 of 6 Lab 02 Student Mark Calculation HTML table button textbox JavaScript comments function parameter and argument variable naming Number().toFixed() Introduction In this lab you will create

More information

Programing for Digital Media EE1707. Lecture 4 JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK

Programing for Digital Media EE1707. Lecture 4 JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK Programing for Digital Media EE1707 Lecture 4 JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK 1 today Event Handling in JavaScript Client-Side JavaScript

More information

Skyway Builder Web Control Guide

Skyway Builder Web Control Guide Skyway Builder Web Control Guide 6.3.0.0-07/21/2009 Skyway Software Skyway Builder Web Control Guide: 6.3.0.0-07/21/2009 Skyway Software Published Copyright 2009 Skyway Software Abstract TBD Table of

More information

Dreamweaver CS3 Concepts and Techniques

Dreamweaver CS3 Concepts and Techniques Dreamweaver CS3 Concepts and Techniques Chapter 3 Tables and Page Layout Part 1 Other pages will be inserted in the website Hierarchical structure shown in page DW206 Chapter 3: Tables and Page Layout

More information

CERTIFICATE IN WEB PROGRAMMING

CERTIFICATE IN WEB PROGRAMMING COURSE DURATION: 6 MONTHS CONTENTS : CERTIFICATE IN WEB PROGRAMMING 1. PROGRAMMING IN C and C++ Language 2. HTML/CSS and JavaScript 3. PHP and MySQL 4. Project on Development of Web Application 1. PROGRAMMING

More information

By the end of this section of the practical, the students should be able to:

By the end of this section of the practical, the students should be able to: By the end of this section of the practical, the students should be able to: Learn about the Document Object Model and the Document Object Model hierarchy Create and use the properties, methods and event

More information

IMY 110 Theme 7 HTML Tables

IMY 110 Theme 7 HTML Tables IMY 110 Theme 7 HTML Tables 1. HTML Tables 1.1. Tables The HTML table model allows authors to arrange data into rows and columns of cells, just as in word processing software such as Microsoft Word. It

More information

HTMLnotesS15.notebook. January 25, 2015

HTMLnotesS15.notebook. January 25, 2015 The link to another page is done with the

More information

USER GUIDE. MADCAP FLARE 2017 r3. QR Codes

USER GUIDE. MADCAP FLARE 2017 r3. QR Codes USER GUIDE MADCAP FLARE 2017 r3 QR Codes Copyright 2018 MadCap Software. All rights reserved. Information in this document is subject to change without notice. The software described in this document is

More information

How to Edit Your Website

How to Edit Your Website How to Edit Your Website A guide to using your Content Management System Overview 2 Accessing the CMS 2 Choosing Your Language 2 Resetting Your Password 3 Sites 4 Favorites 4 Pages 5 Creating Pages 5 Managing

More information

Command-driven, event-driven, and web-based software

Command-driven, event-driven, and web-based software David Keil Spring 2009 Framingham State College Command-driven, event-driven, and web-based software Web pages appear to users as graphical, interactive applications. Their graphical and interactive features

More information

CSC Web Programming. Introduction to HTML

CSC Web Programming. Introduction to HTML CSC 242 - Web Programming Introduction to HTML Semantic Markup The purpose of HTML is to add meaning and structure to the content HTML is not intended for presentation, that is the job of CSS When marking

More information

FrontPage 2000 Tutorial -- Advanced

FrontPage 2000 Tutorial -- Advanced FrontPage 2000 Tutorial -- Advanced Shared Borders Shared Borders are parts of the web page that share content with the other pages in the web. They are located at the top, bottom, left side, or right

More information

Table Basics. The structure of an table

Table Basics. The structure of an table TABLE -FRAMESET Table Basics A table is a grid of rows and columns that intersect to form cells. Two different types of cells exist: Table cell that contains data, is created with the A cell that

More information

Using Dreamweaver. 6 Styles in Websites. 1. Linked or Imported Stylesheets. 2. Embedded Styles. 3. Inline Styles

Using Dreamweaver. 6 Styles in Websites. 1. Linked or Imported Stylesheets. 2. Embedded Styles. 3. Inline Styles Using Dreamweaver 6 So far these exercises have deliberately avoided using HTML s formatting options such as the FONT tag. This is because the basic formatting available in HTML has been made largely redundant

More information

COMP519 Web Programming Lecture 16: JavaScript (Part 7) Handouts

COMP519 Web Programming Lecture 16: JavaScript (Part 7) Handouts COMP519 Web Programming Lecture 16: JavaScript (Part 7) Handouts Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University of Liverpool

More information

Geocaching HTML & BBCode FUNdamentals by Scott Aleckson (SSO JOAT)

Geocaching HTML & BBCode FUNdamentals by Scott Aleckson (SSO JOAT) Geocaching HTML & BBCode FUNdamentals by Scott Aleckson (SSO JOAT) Anchorage BP Energy Center & Broadcast over the Internet via WebEx 18 September 2012 1 Tonight s Topics: Computer Languages What is HTML?

More information

HTML TAG SUMMARY HTML REFERENCE 18 TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES MOST TAGS

HTML TAG SUMMARY HTML REFERENCE 18 TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES MOST TAGS MOST TAGS CLASS Divides tags into groups for applying styles 202 ID Identifies a specific tag 201 STYLE Applies a style locally 200 TITLE Adds tool tips to elements 181 Identifies the HTML version

More information

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space. HTML Summary Structure All of the following are containers. Structure Contains the entire web page. Contains information

More information

EDITOR GUIDE. Button Functions:...2 Inserting Text...4 Inserting Pictures...4 Inserting Tables...8 Inserting Styles...9

EDITOR GUIDE. Button Functions:...2 Inserting Text...4 Inserting Pictures...4 Inserting Tables...8 Inserting Styles...9 EDITOR GUIDE Button Functions:...2 Inserting Text...4 Inserting Pictures...4 Inserting Tables...8 Inserting Styles...9 1 Button Functions: Button Function Display the page content as HTML. Save Preview

More information

Pearson Education Limited Edinburgh Gate Harlow Essex CM20 2JE England and Associated Companies throughout the world

Pearson Education Limited Edinburgh Gate Harlow Essex CM20 2JE England and Associated Companies throughout the world Pearson Education Limited Edinburgh Gate Harlow Essex CM20 2JE England and Associated Companies throughout the world Visit us on the World Wide Web at: www.pearsoned.co.uk Pearson Education Limited 2014

More information

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web HTML & CSS SWE 432, Fall 2017 Design and Implementation of Software for the Web HTML: HyperText Markup Language LaToza Language for describing structure of a document Denotes hierarchy of elements What

More information

Advanced Table Styles

Advanced Table Styles Advanced Table Styles Scott DeLoach scott@clickstart.net ClickStart www.clickstart.net In this session, I will describe advanced techniques for formatting tables. Creating a table Select Insert > Table.

More information

CIS 228 (Spring, 2012) Final, 5/17/12

CIS 228 (Spring, 2012) Final, 5/17/12 CIS 228 (Spring, 2012) Final, 5/17/12 Name (sign) Name (print) email I would prefer to fail than to receive a grade of or lower for this class. Question 1 2 3 4 5 6 7 8 9 A B C D E TOTAL Score CIS 228,

More information

HTML CS 4640 Programming Languages for Web Applications

HTML CS 4640 Programming Languages for Web Applications HTML CS 4640 Programming Languages for Web Applications 1 Anatomy of (Basic) Website Your content + HTML + CSS = Your website structure presentation A website is a way to present your content to the world,

More information

ADOBE DREAMWEAVER CS4 BASICS

ADOBE DREAMWEAVER CS4 BASICS ADOBE DREAMWEAVER CS4 BASICS Dreamweaver CS4 2 This tutorial focuses on the basic steps involved in creating an attractive, functional website. In using this tutorial you will learn to design a site layout,

More information

File: SiteExecutive 2013 Core Modules User Guide.docx Printed September 30, 2013

File: SiteExecutive 2013 Core Modules User Guide.docx Printed September 30, 2013 File: SiteExecutive 2013 Core Modules User Guide.docx Printed September 30, 2013 Page i Contact: Systems Alliance, Inc. Executive Plaza III 11350 McCormick Road, Suite 1203 Hunt Valley, Maryland 21031

More information

Animating Layers with Timelines

Animating Layers with Timelines Animating Layers with Timelines Dynamic HTML, or DHTML, refers to the combination of HTML with a scripting language that allows you to change style or positioning properties of HTML elements. Timelines,

More information

CSC Web Programming. Introduction to JavaScript

CSC Web Programming. Introduction to JavaScript CSC 242 - Web Programming Introduction to JavaScript JavaScript JavaScript is a client-side scripting language the code is executed by the web browser JavaScript is an embedded language it relies on its

More information

Web Programming Week 2 Semester Byron Fisher 2018

Web Programming Week 2 Semester Byron Fisher 2018 Web Programming Week 2 Semester 1-2018 Byron Fisher 2018 INTRODUCTION Welcome to Week 2! In the next 60 minutes you will be learning about basic Web Programming with a view to creating your own ecommerce

More information