JavaScript Big fun with JavaScript in the real world

Slides:



Advertisements
Similar presentations
Samsung Smart TV is a web-based application running on an application engine installed on digital TVs connected to the Internet.
Advertisements

Bring Life to Your Web Pages with JavaScript and HTML5 Ole Ildsgaard Hougaard -
JavaScript and the DOM Les Carr COMP3001 Les Carr COMP3001.
The Web Warrior Guide to Web Design Technologies
JavaScript Forms Form Validation Cookies. What JavaScript can do  Control document appearance and content  Control the browser  Interact with user.
JavaScript (Part 2) CS 183 4/13/2010. JavaScript (Part 2) Will cover: ◦ For.. In ◦ Events ◦ Try.. Catch, Throw ◦ Objects.
MSc. Publishing on WWW JavaScript. What is JavaScript? A scripting language devised by Netscape Adds functionality to web pages by: Embedding code into.
Information Technology Center Hany Abdelwahab Computer Specialist.
Multiple Tiers in Action
Web Development & Design Foundations with XHTML Chapter 14 Key Concepts.
Client side programming with JavaScript and DHTML Dr Jim Briggs.
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 14 Key Concepts 1 Copyright © Terry Felke-Morris.
Web Programming Material From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 1 Introduction The JavaScript Programming.
Javascript and the Web Whys and Hows of Javascript.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Dynamic Action with Macromedia Dreamweaver MX Barry Sosinsky Valda Hilley.
Event Handlers CS101 Introduction to Computing. Learning Goals Learn about event handlers Determine how events are useful in JavaScript Discover where.
1 JavaScript E-Commerce Prof. Sheizaf Rafaeli
Generations of Programming Languages First generation  Machine Language Second Generation  Assembly Language Third Generation  Procedural language such.
Project Proposal Interface Design Website Coding Website Testing & Launching Website Maintenance.
JavaScript Part 1.
JavaScript 1. What is JavaScript? JavaScript allows web authors to create dynamic pages that react to user interaction. It is an Object-based because.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 14 Key Concepts 1 Copyright © Terry Felke-Morris.
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.
Client Side Programming with JavaScript Why use client side programming? Web sides built on CGI programs can rapidly become overly complicated to maintain,
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
An Introduction to JavaScript Summarized from Chapter 6 of “Web Programming: Building Internet Applications”, 3 rd Edition.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
CO1552 Web Application Development HTML Forms, Events and an introduction to JavaScript.
JavaScript - A Web Script Language Fred Durao
HTML Form Widgets. Review: HTML Forms HTML forms are used to create web pages that accept user input Forms allow the user to communicate information back.
© 2000 – All Rights Reserved - Page 1 Introduction to JavaScript Programming Part One.
Introduction To JavaScript. Putting it Together (page 11) All javascript must go in-between the script tags. All javascript must go in-between the script.
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.
© 2007 D. J. ForemanJS-1 A Light Introduction for Non-programmers JavaScript for Beginners.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 14 Key Concepts 1 Copyright © Terry Felke-Morris.
1) PHP – Personal Home Page Scripting Language 2) JavaScript.
Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
Document Object Model Nasrullah. DOM When a page is loaded,browser creates a Document Object Model of the Page.
Introduction to JavaScript MIS 3502, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 2/2/2016.
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
Java Script Programming. Review: Event Handling Text Box Title: Button.
JavaScript Wrap Up JavaScript is a versatile programming language … if you know it, you can learn others © 2004, Lawrence Snyder.
Wes Preston DEV 202. Audience: Info Workers, Dev A deeper dive into use-cases where client-side rendering (CSR) and SharePoint’s JS Link property can.
1 Using jQuery JavaScript & jQuery the missing manual (Second Edition)
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.
G046 – Lecture 2A Recognising Web-Technologies Mr C Johnston ICT Teacher
Introduction to JavaScript MIS 3502, Fall 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 9/29/2016.
JAVA, JAVA Applets, and JavaScript
Web Development & Design Foundations with HTML5
JavaScript is a programming language designed for Web pages.
© 2015, Mike Murach & Associates, Inc.
Donna J. Kain, Clarkson University
Section 17.1 Section 17.2 Add an audio file using HTML
Web Development & Design Foundations with HTML5 7th Edition
JavaScript for Beginners
Introduction to JavaScript
A second look at JavaScript
Introduction to JavaScript
Web Development & Design Foundations with H T M L 5
Web Design and Development
Introduction to JavaScript
JavaScript Basics What is JavaScript?
JavaScript is a scripting language designed for Web pages by Netscape.
JavaScript for Beginners
JavaScript for Beginners
Presentation transcript:

JavaScript Big fun with JavaScript in the real world Very early in the morning February 17, 2000

Why JavaScript? You can’t deal with a Java applet You want more glitz on your pages You need some active widgets that HTML does not have You want on-the-fly calculations User’s need the option to do database lookups without submitting the HTML form they are filling out

Why NOT JavaScript? Some users have turned off JavaScript in their browser Semi-broken implementations Some browsers will never support it You might have to special case the code depending on which browser the user has… With JavaScript, you are signing up for more maintenance and testing costs

The basics JavaScript lives in the HTML page surrounded by the tags <script language="Javascript"> <!-- hide this from lame browsers Your code goes here // --> </script> You get variables, some event handling, and the chance to open new windows without a trip back to the web server

Debugging alert("some string") is about as good as it gets Do yourself a favor and edit the HTML page locally so you are not uploading it to the web server each time you change something while debugging Typing javascript: into the location in Netscape gets you a console

Example: Glitz Event handlers let you animate things <a href="/foo" onMouseOver="funct()" onMouseOut="funct2()"<a> OnClick, OnLoad, OnSubmit, etc. let you attach functions to elements of a page You can change element of the page from the event handler function

...Example: Glitz Javascript functions can stuff values into fields, open windows, or change the images Elements on a page can be addressed like this: document.forms[0].elements.foo.value See http://www.techmart.umn.edu/

Example: Calculations Running totals are a natural addition to many sorts of forms Unfortunately, JavaScript’s floating point number support is less than optimal See the wretched JAWS timesheet http://pong.software.umn.edu/ See the well-loved FormsNirvana POT http://nirvana.fss.umn.edu/

Example: DataBase lookups Nobody can remember all the job titles or department names at the University You might want to spawn a child window to do a lookup and auto-fill an HTML form field. Example: the conflict of interest form at http://nirvana.ospa.umn.edu/

Summary Do not require the use of JavaScript. Give the JavaScript-challenged equal access to your site Debug carefully. Alert() is your friend. Test on multiple platforms (various browser versions on Unix, Mac, & PC) JavaScript is not harmful when used under controlled conditions