Using Embedded JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Embedding JavaScript In HTML Instructor: Joseph DiVerdi, Ph.D., MBA.

Slides:



Advertisements
Similar presentations
Essentials for Design JavaScript Level One Michael Brooks
Advertisements

JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Introduction to JavaScript
The Web Warrior Guide to Web Design Technologies
JavaScript 101 Lesson 01: Writing Your First JavaScript.
MSc. Publishing on WWW JavaScript. What is JavaScript? A scripting language devised by Netscape Adds functionality to web pages by: Embedding code into.
HTML Recall that HTML is static in that it describes how a page is to be displayed, but it doesn’t provide for interaction or animation. A page created.
JavaScript 101 Lesson 5: Introduction to Events. Lesson Topics Event driven programming Events and event handlers The onClick event handler for hyperlinks.
Inline, Internal, and External FIle
Introduction to JavaScript Form Verification - Fort Collins, CO Copyright © XTR Systems, LLC Verifying Submitted Form Data with JavaScript Instructor:
JQuery CS 268. What is jQuery? From their web site:
INTRODUCTION TO CLIENT-SIDE WEB PROGRAMMING ACM 511 ACM 262 Course Notes.
Javascript and the Web Whys and Hows of Javascript.
4.1 JavaScript Introduction
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Dynamic Action with Macromedia Dreamweaver MX Barry Sosinsky Valda Hilley.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
JavaScript 1. What is JavaScript? JavaScript allows web authors to create dynamic pages that react to user interaction. It is an Object-based because.
Lesson 19. JavaScript errors Since JavaScript is an interpreted language, syntax errors will usually cause the script to fail. Both browsers will provide.
DHTML: Dynamic HTML Internet Technology1. What is DHTML? A collection of enhancements to HTML ► To create dynamic and interactive websites Combination.
Using JavaScript in FORMs Fort Collins, CO Copyright © XTR Systems, LLC Learning to Use JavaScript in HTML FORMs Instructor: Joseph DiVerdi, Ph.D., MBA.
Working with Objects Creating a Dynamic Web Page.
CSU - DCE Advanced Perl CGI Operation - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to the Common Gateway Interface (CGI) on the.
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,
CSU - DCE Webmaster I HTML - Forms - Fort Collins, CO Copyright © XTR Systems, LLC Designing Web Sites using HTML - Introduction to Forms Instructor:
1 JavaScript in Context. Server-Side Programming.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
Introduction to JavaScript 41 Introduction to Programming the WWW I CMSC Winter 2004 Lecture 17.
_______________________________________________________________________________________________________________ PHP Bible, 2 nd Edition1  Wiley and the.
JavaScript Tutorial 1 - Introduction to JavaScript WDMD 170 – UW Stevens Point 1 WDMD 170 Internet Languages eLesson: Introduction to JavaScript – A First.
CSU - DEO Introduction to CGI - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to the Common Gateway Interface (CGI) Instructor: Joseph DiVerdi,
A Little Bit About Cookies Fort Collins, CO Copyright © XTR Systems, LLC A Little Bit About Cookies Instructor: Joseph DiVerdi, Ph.D., M.B.A.
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.
CSU - DCE Webmaster I Design with HTML #1 - Fort Collins, CO Copyright © XTR Systems, LLC Designing Web Sites using HTML #1 Instructor: Joseph DiVerdi,
Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to & Overview of PHP Instructor: Joseph DiVerdi,
By Tharith Sriv. To write a web page you use: HHTML (HyperText Markup Language), AASP (Active Server Page), PPHP (HyperText Preprocessor), JJavaScript,
CSU - DCE Webmaster I HTML - Tables - Fort Collins, CO Copyright © XTR Systems, LLC Designing Web Sites using HTML - Introduction to Tables Instructor:
Creating a Remotely-Hosted Web Site Fort Collins, CO Copyright © XTR Systems, LLC Creating Your First Remotely-Hosted Web Site Instructor: Joseph DiVerdi,
Introduction into JavaScript Java 1 JavaScript JavaScript programs run from within an HTML document The statements that make up a program in an HTML.
WDMD 170 – UW Stevens Point 1 WDMD 170 Internet Languages eLesson: Variables, Functions and Events (NON-Audio version) © Dr. David C. Gibbs WDMD.
Unit 13 –JQuery Basics Instructor: Brent Presley.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 14 Key Concepts 1 Copyright © Terry Felke-Morris.
Introduction to JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Introduction to JavaScript Programming Instructor: Joseph DiVerdi, Ph.D., MBA.
INTRODUCTION JavaScript can make websites more interactive, interesting, and user-friendly.
Webmaster II Introductions - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to Webmaster II Instructor: Joseph DiVerdi, Ph.D., MBA.
Host Objects: Browsers and the DOM
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
CSU - DCE Introduction to CSS CSS URLs - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Specifying URLs Instructor: Joseph.
CSU - DCE Advanced Perl Introductions - Fort Collins, CO Copyright © XTR Systems, LLC Advanced Perl Programming Instructor: Joseph DiVerdi, Ph.D.
Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Introduction to Server Side Includes (SSI) Instructor: Joseph DiVerdi,
Chapter 10 Dynamic HTML (DHTML) JavaScript, Third Edition.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 2 Key Concepts 1 Copyright © Terry Felke-Morris.
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
PHP Introduction & Overview Fort Collins, CO Copyright © XTR Systems, LLC Introduction to & Overview of PHP Instructor: Joseph DiVerdi, Ph.D., MBA.
JavaScript Syntax Fort Collins, CO Copyright © XTR Systems, LLC Introduction to JavaScript Syntax Instructor: Joseph DiVerdi, Ph.D., MBA.
CSU - DCE Webmaster JavaScript Class - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to Object-Oriented Perl and CGI.pm Instructor:
Web Programming Java Script-Introduction. What is Javascript? JavaScript is a scripting language using for the Web. JavaScript is a programming language.
JavaScript, Third Edition 1 SELECTION LIST Demo. JavaScript, Third Edition 2 Description This web page will edit the slection to ensure an option was.
Copyright © Terry Felke-Morris Web Development & Design Foundations with HTML5 8 th Edition CHAPTER 14 KEY CONCEPTS 1 Copyright.
CSU - DCE Webmaster I HTML & URLs - Fort Collins, CO Copyright © XTR Systems, LLC Designing Web Sites With HTML - Using Effective Links Instructor:
JavaScript is a programming language designed for Web pages.
Microsoft® Office FrontPage® 2003 Training
Web Development & Design Foundations with HTML5 7th Edition
DHTML Javascript Internet Technology.
DHTML Javascript Internet Technology.
JavaScript Basics What is JavaScript?
JavaScript is a scripting language designed for Web pages by Netscape.
Presentation transcript:

Using Embedded JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Embedding JavaScript In HTML Instructor: Joseph DiVerdi, Ph.D., MBA

Using Embedded JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Example Syntax Two Parts to Most JavaScript: –Function Definitions Tell the Browser What to Do Not required –References To Those Functions Required

Using Embedded JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Status Line Message No Function Required Tightly Integrated Into HTML Uses HTML Event Handler ONMOUSEOVER <A HREF=“mozart.html” ONMOUSEOVER= “window.status=‘A study of the operas of Mozart’; return true;” >Mozart Use This Code on Your Site Now –Create a new file named status.html –See the Next Two Slides

Using Embedded JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Status Line Message Status Line Example Disney WWF

Using Embedded JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Status Line Message Status Line Example <A HREF =" ONMOUSEOVER="window.status='Go to the Magic Kingdom?'; return true;">Disney <A HREF=" ONMOUSEOVER="window.status='Most Polite People on Earth'; return true;">WWF

Using Embedded JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Debugging JavaScript No JavaScript Validator Exists at This Time –None is Likely for Some Time Navigator's & Explorer's implementations in Advanced Features Diverge Dignificantly –Their DOMs are Very Different Document Object Model - The API for interacting with Web Documents –Basic Features are Quite Similar –Both Browsers Provide Some Debugging

Using Embedded JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Development Strategy Use Netscape Navigator to Test JavaScript Examine Status Line When Page Loads If an Error Occurs –Location Contains a Message to go to javascript: Type javascript: in Location to View Console –It is Helpful to Add javascript: to Bookmarks Create Quick Development Environment –Run HTML-Kit –Run Navigator

Using Embedded JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Display Browser Identity No Function Definitions Required Goes Right into Body of HTML Document Use This Code on Your Site Now –Create a new file named browser.html –See the Next Slide

Using Embedded JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Display Browser Identity Browser Identity Example You are using: document.write(navigator.appName + ' - ' + navigator.appVersion);

Using Embedded JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Hiding JavaScript JavaScript code is –Completely Dependent on Browser Support If a Browser doesn’t Understand JavaScript Then the Code is Displayed as Text –The Result is Usually Rather Unpleasant The Solution is to Use HTML Comments to Encapsulate the JavaScript Code

Using Embedded JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Hiding JavaScript <!-- JavaScript code goes here // --> Comment Codes Must be On Own Lines –Otherwise the JavaScript Code Itself Will Be Commented Out & Unusable Notice Closing Comment –Contains C++ Comment & HTML Comment Close

Using Embedded JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Commenting Out Code Browser Identity Example You are using: <!-- document.write(navigator.appName + ' - ' + navigator.appVersion); // -->

Using Embedded JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Browser Compatibility Browsers Have Different Internal Models –Page Element Access is Different & Incompatible Online Table of Browser JavaScript support: Design Issues –For What Version(s) Does One Design? –For Certain Projects the Code is Identical –For Others You Must Create a Browser Selector And Create Two Versions of JavaScript Code More on This Later in the Course