ATLAS 2200 - WEB JavaScript & the DOM.

Slides:



Advertisements
Similar presentations
The Web Wizards Guide To JavaScript Chapter 1 JavaScript Basics.
Advertisements

Designing Websites Using HTML and FrontPage A Typical Webpage View Source A webpage is a text file containing instructions to tell a computer how the.
Introduction to JavaScript
HTTP Request/Response Process 1.Enter URL ( in your browser’s address bar. 2.Your browser uses DNS to look up IP address of server.com.
Introduction to JavaScript Module 1 Client Side JS Programming M-GO Sponsored By
1 Owais Mohammad Haq Department of Computer Science Eastern Michigan University April, 2005 Java Script.
Lecture 3B: Client-Side Scripting IT 202—Internet Applications Based on notes developed by Morgan Benton.
ISP 523: Fundamentals of Information Technology Instructor: Stephen Lackey November 2, 2005.
(CS1301) Introduction to Computer Programming City Univ of HK / Dept of CS / Helena Wong 1. Overview of Programming and JavaScript - 1
COMPUTER TERMS PART 1. COOKIE A cookie is a small amount of data generated by a website and saved by your web browser. Its purpose is to remember information.
Introduction to Javascript. Web Page Technologies To create Web Page documents, you use: To create Web Page documents, you use: HTML – contents and structures.
Overview of HTML. Three Different Approaches  Text editor like Notepad  HTML editor such as: –KompoZer –DreamWeaver –Microsoft Expression Web –iWeb.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Introdution to Computer Science ICS3U/4U.  New room!!!  Respect it  Wooden tables  No food/drink  Bathroom – one at a time  Course outline – coming.
DIY Web Development Hand Code Your Own Page (For Free!) by Bryan Brown, Indiana University Bloomington SLIS.
Introduction to JavaScript Kirkwood Continuing Education © Copyright 2014, Fred McClurg All Rights Reserved.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
DOM and JavaScript Aryo Pinandito.
Working with Objects Creating a Dynamic Web Page.
Flash & JavaScript Mariela Hristova October 19, 2004 INF 385E – Fall 2004 – School of Information.
JavaScript Tutorial 1 - Introduction to JavaScript WDMD 170 – UW Stevens Point 1 WDMD 170 Internet Languages eLesson: Introduction to JavaScript (NON.
An Introduction to JavaScript Summarized from Chapter 6 of “Web Programming: Building Internet Applications”, 3 rd Edition.
Interactive Client-Side Technologies MMIS 656 Web Design Technologies Acknowledgements: Estrella, S. (2003). The Web Wizard’s Guide to DHTML and CSS.
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 7.
JavaScript - A Web Script Language Fred Durao
Introduction to the Document Object Model DOM *Understand document structure manipulation *Dynamic effects in web pages *Programming, scripting, web content.
An Introduction to JavaScript By: John Coliton Tuesday, November 10, 1998 Center for Teaching and Learning.
Cs332a_chapt10.ppt CS332A Advanced HTML Programming DHTML Dynamic Hypertext Markup Language A term describing a series of technologies Not a stand-a-lone.
TOPIC II Dynamic HTML Prepared by: Nimcan Cabd Cali.
Scripting Languages Client Side and Server Side. Examples of client side/server side Examples of client-side side include: JavaScript Jquery (uses a JavaScript.
Introduction to HTML. _______________________________________________________________________________________________________________ 2 Outline Key issues.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 14 Key Concepts 1 Copyright © Terry Felke-Morris.
USING JAVASCRIPT TO SHOW AN ALERT Web Design Sec 6-2 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
JavaScript & Introduction to AJAX
The Web Wizard’s Guide To DHTML and CSS Chapter 2 A Review of CSS2 and JavaScript.
The Web Wizard’s Guide To DHTML and CSS Chapter 2 A Review of CSS2 and JavaScript.
Introduction to Web Site Development Department of Computer Science California State University, Los Angeles Lecture 9: JavaScript.
Copyright © Terry Felke-Morris Web Development & Design Foundations with HTML5 8 th Edition CHAPTER 14 KEY CONCEPTS 1 Copyright.
G046 – Lecture 2A Recognising Web-Technologies Mr C Johnston ICT Teacher
JQuery Fundamentals Introduction Tutorial Videos
Introduction to.
DHTML.
Week 3: Introduction to Javascript
Using JavaScript to Show an Alert
Web Graphics & Optimization
CIS 388 Internet Programming
Week 4: Introduction to Javascript
Week 5 JavaScript Overview JavaScript Examples
The Internet and HTML Code
Web Development & Design Foundations with HTML5 7th Edition
Unit 2, Lesson 5 Website Development Tools
Unit 2, Lesson 5 Website Development Tools
14 A Brief Look at JavaScript and jQuery.
Web Responsive Design.
Introduction to JavaScript
JavaScript an introduction.
The Web Wizard’s Guide To JavaScript
DHTML Javascript Internet Technology.
Your 1st Programming Assignment
Introduction to JavaScript
DHTML Javascript Internet Technology.
Objective Understand web-based digital media production methods, software, and hardware. Course Weight : 10%
Java Applets.
Unit 6 part 3 Test Javascript Test.
JavaScript Overview By Kevin Harville.
Tutorial 10: Programming with javascript
Introduction to JavaScript
Web Programming and Design
Web Programming and Design
Web Programming and Design
Presentation transcript:

ATLAS 2200 - WEB JavaScript & the DOM

Peanut Butter & Jelly Sandwich How do I make one?

A Script A script is a series of instructions that a computer can follow to achieve a specific goal, big or small Log into a social media app Click through a slide show Buy a product online Reserve a hotel room Etc.

A Script People follow them too Recipes How-to Manuals Tutorials Driving directions Etc.

Writing a Script Define your main goal & smaller goals Design the script Code each step

Goals: Learn HTML Download FTP client, VPN, and Code Editor Set up home folder (root directory) with sub folders Learn basic HTML format & syntax Learn Semantics Learn HTML structure Learn HTML content Validate Upload

Design Script

Code

Scripting Computers solve problems programmatically Follow instructions one at a time Require specific details with little to no error

Scripting

Scripting for the Web Java (Not JavaScript) Python PHP Ruby C++ …

JavaScript (As well as Klingon)

JavaScript One of the three primary pillars of web development HTML – Content & Structure CSS – Design JavaScript – Behavior

JavaScript vs. Java One of the three primary pillars of web development Java Developed at Sun Microsystems in 1995. Can stand alone. JavaScript Developed… also in 1995… by Netscape. Was originally called LiveScript. Usually exists within a web page and communicates with HTML / CSS Similar syntax

JavaScript Beginnings The web needed to be more dynamic Netscape developed JS for their browser Microsoft released jScript in 1996 for IE 3.0 (Because of course they did…) Not compatible with JavaScript Roadblock to web browser compatibility

JavaScript Beginnings Macromedia Flash ActionScript Plugin based Widely adopted (though proprietary) JavaScript continued gaining favor in early 2000s and by mid-late 2000s was the most used scripting / programming language for the web. Fully supported by all major browsers Non-proprietary

Object Properties Object: Car Make: Subaru Model: Outback Year: 2017 Color: Black Speed: 0mph

Events Accelerate Decelerate Turn Reverse

Methods Accelerate(); Decelerate(); TurnRight(); TurnLeft(); Reverse();

Methods Accelerate(); Decelerate(); TurnRight(); TurnLeft(); Reverse();

Document Object Model Represents your webpage Properties Events Width, height, color, font-size, etc. Events onClick, onMouseOver, onLoad, etc. Methods loadContent(); sayHi(); login(); purchase();

All browsers implement the DOM in the same way Document Object Model All browsers implement the DOM in the same way

Loading JavaScript Internal: <script type="text/javascript"> alert("Hello World"); </script> External: <script src="js/demo.js" type="text/javascript"></script>

Loading JavaScript Where? Usually in the <head> or just before </body> Alert(“Hello World”);

Loading JavaScript When? After the DOM (web page) has loaded document.getElementById("myParagraph").innerHTML = "Hi"; <p id="myParagraph"> … </p>

Loading JavaScript When? <p id="myParagraph"> Hi </p> document.getElementById("myParagraph").innerHTML = "Hi";

Calling Objects Method document.getElementById("idName") document.getElementByClassName("ClassName") Document.body… Document.h1…

Accessing CSS within the DOM document.getElementById("idName").style._______ = _____; Style Object Properties: https://www.w3schools.com/jsref/dom_obj_style.asp

Attendance Question: Week 7 Poor Ian is lost. Write a script to guide him back to his office. Detail is essential. Don’t get him killed. Post your question to Edmodo under “Lecture Attendance Question Week 7” Your answer should be approximately one paragraph in length.