CT Web Development, Colorado State University

Slides:



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

JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Java Script Session1 INTRODUCTION.
MSc. Publishing on WWW JavaScript. What is JavaScript? A scripting language devised by Netscape Adds functionality to web pages by: Embedding code into.
Web Page Behavior IS 373—Web Standards Todd Will.
Macromedia Dreamweaver 4 Advanced Level Course. Add Rollovers Rollovers or mouseovers are possibly the most popular effects used in designing Web pages.
Tutorial 13 Working with Objects and Styles. XP Objectives Learn about objects and the document object model Reference documents objects by ID, name,
© Cheltenham Computer Training 2001 Macromedia Dreamweaver 4 - Slide No 1 Macromedia Dreamweaver 4 Advanced Level Course.
JavaScript Defined DOM (Document Object Model) General Syntax Body vs. Head Variables Math & Logic Selection Functions & Events Loops Animation Getting.
Advanced Web Design Scripting Tutorial Chapters. Scripting Intro The scripting part of the forthcoming Advanced Web Design textbook introduces you to.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
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.
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Working with Objects Creating a Dynamic Web Page.
JavaScript. Overview Introduction: JavaScript basics Expressions and types Expressions and types Arrays Arrays Objects and Associative Arrays Objects.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
CO1552 Web Application Development HTML Forms, Events and an introduction to JavaScript.
JavaScript Syntax, how to use it in a HTML document
JavaScript - Basic Concepts Prepared and Presented by Hienvinh Nguyen, Afshin Tiraie.
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.
JavaScript Defined DOM (Document Object Model) General Syntax Body vs. Head Variables Math & Logic Selection Functions & Events Loops Animation Getting.
Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
Host Objects: Browsers and the DOM
Document Object Model Nasrullah. DOM When a page is loaded,browser creates a Document Object Model of the Page.
Chapter 6 Murach's JavaScript and jQuery, C6© 2012, Mike Murach & Associates, Inc.Slide 1.
Chapter 10 Dynamic HTML (DHTML) JavaScript, Third Edition.
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
JavaScript and Ajax (JavaScript Environment) Week 6 Web site:
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 5 Host Objects: Browsers.
COM621: Advanced Interactive Web Development Lecture 6 – JavaScript (cont.)
Tarik Booker CS 120 California State University, Los Angeles.
Introduction to JavaScript MIS 3502, Fall 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 9/29/2016.
Introduction to.
CGS 3066: Web Programming and Design Spring 2017
Web Basics: HTML/CSS/JavaScript What are they?
Javascript and Dynamic Web Pages: Client Side Processing
Applied Component I Unit II Introduction of java-script
Using DHTML to Enhance Web Pages
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Week 4: Introduction to Javascript
JavaScript is a programming language designed for Web pages.
© 2015, Mike Murach & Associates, Inc.
Intro to JavaScript CS 1150 Spring 2017.
Section 17.1 Section 17.2 Add an audio file using HTML
Web Development & Design Foundations with HTML5 7th Edition
Intro to PHP & Variables
Introduction to JavaScript
* Lecture 26 Manifest Asynchrony
Server Side Programming Overview And file system basics
JavaScript Introduction
DHTML Javascript Internet Technology.
* Lecture 12 Mapping, Map Reduction Summing integers,
Web Programming A different world! Three main languages/tools No Java
* Lecture 5 PHP Basics * Course logo spider web photograph from Morguefile openstock photograph by Gabor Karpati, Hungary.
Querying Client Information Forms and Passing Data,
* jQuery * Course logo spider web photograph from Morguefile openstock photograph by Gabor Karpati, Hungary.
Integrating JavaScript and HTML
DHTML Javascript Internet Technology.
Introduction to DHTML, the DOM, JS review
Introduction to JavaScript
JavaScript Basics What is JavaScript?
Getting started with jQuery
JavaScript.
CNIT 133 Interactive Web Pags – JavaScript and AJAX
Web Programming and Design
Web Programming and Design
Presentation transcript:

CT 310 - Web Development, Colorado State University * JavaScript * Slide background spider web photograph from Morguefile openstock photograph by Gabor Karpati, Hungary. November 13, 2018 CT 310 - Web Development, Colorado State University

Client-side Dynamic HTML Definition by behavior HTML Document Changes Client-Side. In response to user. Automatically, for example animation. Definition by example – Mix Client side scripting, e.g. JavaScript Page elements are object, e.g. DOM Properties of objects, e.g. CSS November 13, 2018 CT 310 - Web Development, Colorado State University

CT 310 - Web Development, Colorado State University Document Object Model There is a lot going one here! Appropriate for this course: Common elements on a page, Including the page itself, Are objects to which actions may be attached. November 13, 2018 CT 310 - Web Development, Colorado State University

JavaScript – Look Hither Do not confuse Java and JavaScript. Learning JavaScript. Where to start. Learn by example: Textbook The web We will not be going too deep. Mind security/convenience tradeoff. November 13, 2018 CT 310 - Web Development, Colorado State University

CT 310 - Web Development, Colorado State University November 13, 2018 CT 310 - Web Development, Colorado State University

CT 310 - Web Development, Colorado State University Hello World You may write to the document. November 13, 2018 CT 310 - Web Development, Colorado State University

CT 310 - Web Development, Colorado State University Hello World Page November 13, 2018 CT 310 - Web Development, Colorado State University

Example 1 - Observations The script tag has ‘type’ attribute. Language attribute is depricated. Note the use of <noscript> tags. Arguably less important now, but … No accounting for older browsers. First taste of document object model. The document object has method ‘write’. November 13, 2018 CT 310 - Web Development, Colorado State University

CT 310 - Web Development, Colorado State University Example 2 Using CSS id’s to name objects. Accessing properties of objects. Assignment to variables. String concatenation. November 13, 2018 CT 310 - Web Development, Colorado State University

CT 310 - Web Development, Colorado State University Example 2 – The Page The printed URL is pulled from link. November 13, 2018 CT 310 - Web Development, Colorado State University

CT 310 - Web Development, Colorado State University Example 3 – Functions Usually in header or separate file. Definition syntax pretty standard. November 13, 2018 CT 310 - Web Development, Colorado State University

CT 310 - Web Development, Colorado State University First Taste of Power What is document.location.href ? It is the URL of the current window. It can be used to retrieve a URL. In our example it is on the left side of an assignment statement. … think about this … That is enough to switch the page! Fun, but not generally a good idea. November 13, 2018 CT 310 - Web Development, Colorado State University

CT 310 - Web Development, Colorado State University Example 3 - Events JavaScript is about exploiting events. Many events involve the mouse. For example, a click (up or down). Or, simply passing over an object. November 13, 2018 CT 310 - Web Development, Colorado State University

CT 310 - Web Development, Colorado State University Example 3 – The Page November 13, 2018 CT 310 - Web Development, Colorado State University

CT 310 - Web Development, Colorado State University Example 3 – The Page November 13, 2018 CT 310 - Web Development, Colorado State University

Example 4 – More Functions Conditionals, recursion and return. Get in touch with ‘innerHTML’  November 13, 2018 CT 310 - Web Development, Colorado State University

Example 4 – Make it Go What makes this page do something? Think about object’s ‘enter’ and ‘num’. Assignment to ‘innerHTML’ is powerful. Caution Try ‘return’ vs. ‘tab’ key November 13, 2018 CT 310 - Web Development, Colorado State University

CT 310 - Web Development, Colorado State University Example 5 – Navigation Notice how the URL passes to goSite(). November 13, 2018 CT 310 - Web Development, Colorado State University

CT 310 - Web Development, Colorado State University Example 5 – The Page November 13, 2018 CT 310 - Web Development, Colorado State University

CT 310 - Web Development, Colorado State University Example 6 - Buttons November 13, 2018 CT 310 - Web Development, Colorado State University

CT 310 - Web Development, Colorado State University Example 6 – Window.open November 13, 2018 CT 310 - Web Development, Colorado State University

CT 310 - Web Development, Colorado State University Example 7 – Rollover Change the image based upon mouse. November 13, 2018 CT 310 - Web Development, Colorado State University

CT 310 - Web Development, Colorado State University Example 7 - Header Note the variables and image objects. November 13, 2018 CT 310 - Web Development, Colorado State University

CT 310 - Web Development, Colorado State University Example 7 – The Table Note that ‘display’ is the name of an image object on the page. Two types of mouse events. November 13, 2018 CT 310 - Web Development, Colorado State University