Brief Look InTo JavaScript Dr. Thomas Hicks Computer Science Department Trinity University.

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

Essentials for Design JavaScript Level One Michael Brooks
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Java Script Session1 INTRODUCTION.
Introduction to JavaScript
Understand Web Page Development Software Development Fundamentals LESSON 4.1.
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
got ? Research Project – April 1998 Hang Xia, Mark Wang, Richard S. Chang Updated: R Norman, August 1999.
MSc. Publishing on WWW JavaScript. What is JavaScript? A scripting language devised by Netscape Adds functionality to web pages by: Embedding code into.
1 Owais Mohammad Haq Department of Computer Science Eastern Michigan University April, 2005 Java Script.
JavaScript- Introduction. What it is and what it does? What it is? It is NOT Java It is NOT Server-side programming Users can see code It is a client-side.
Multiple Tiers in Action
Apache Tomcat Server Typical html Request/Response cycle
2012 •••••••••••••••••••••••••••••••••• Summer WorkShop Mostafa Badr
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
Introduction to JavaScript. Aim To enable you to write you first JavaScript.
INTRODUCTION TO WEB DATABASE PROGRAMMING
4.1 JavaScript Introduction
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Introduction to JavaScript Dr. John P. Abraham University of Texas – Pan American.
CS346 - Javascript 1, 21 Module 1 Introduction to JavaScript CS346.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Comp2513 Forms and CGI Server Applications Daniel L. Silver, Ph.D.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Chapter 6: Forms JavaScript - Introductory. Previewing the Product Registration Form.
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
Programming the Web Web = Computer Network + Hypertext.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
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.
What is Java Script? An extension to HTML. An extension to HTML. Allows authors to incorporate some functionality in their web pages. (without using CGI.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
Tutorial 10 Programming with JavaScript
Introduction to JavaScript Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan. 1.
An Introduction to JavaScript Summarized from Chapter 6 of “Web Programming: Building Internet Applications”, 3 rd Edition.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
JavaScript. During the last lecture We looked at the utility of forms on Web pages We found out about the various components that are used in a form We.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
JS Basics 1 Lecture JavaScript - Basics. JS Basics 2 What is JavaScript JavaScript is a “simple”, interpreted, programming language with elementary object-
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 14 Database Connectivity and Web Technologies.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
JavaScript Syntax, how to use it in a HTML document
An Introduction to JavaScript By: John Coliton Tuesday, November 10, 1998 Center for Teaching and Learning.
Introduction to JavaScript CS101 Introduction to Computing.
Overview of Form and Javascript fundamentals. Brief matching exercise 1. This is the software that allows a user to access and view HTML documents 2.
Sahar Mosleh California State University San MarcosPage 1 JavaScript Basic.
ECA 225 Applied Interactive Programming1 ECA 225 Applied Online Programming basics.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Client-side & Server-side Scripting ©Richard L. Goldman August 5, 2003 Requires PowerPoint 2002 or later for full functionality.
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,
JavaScript Introduction.  JavaScript is a scripting language  A scripting language is a lightweight programming language  A JavaScript can be inserted.
Fall 2000C.Watters1 World Wide Web and E-Commerce Clients & Client Side Processing.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 14 Database Connectivity and Web Technologies.
JavaScript 101 Introduction to Programming. Topics What is programming? The common elements found in most programming languages Introduction to JavaScript.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Applications Active Web Documents Active Web Documents.
Module 1 Introduction to JavaScript
4. Javascript Pemrograman Web I Program Studi Teknik Informatika
Introduction to JavaScript
Introduction to JavaScript
Introduction to JavaScript
Tutorial 10: Programming with javascript
Introduction to JavaScript
Information Retrieval and Web Design
Introduction to JavaScript
Brief Look InTo JavaScript
Presentation transcript:

Brief Look InTo JavaScript Dr. Thomas Hicks Computer Science Department Trinity University

JavaScript developed by Netscape version 1.2 (Netscape 4.0) Netscape considered authority Not all versions are the same David Flannigan

“JavaScript is a lightweight, interpreted, programming language with rudimentary object- oriented programming capbilities”. David Flannigan

JavaScript is syntactically similar to Java and C++! Similarities end there!

JavaScript is powerful because a client-side version has been embedded within some of the more recent browsers! Netscape & Internet Explorer

JavaScript is a case sensitive language! while (not While, WHILE, etc.) JavaScript ignores white space! (space, tab, newline between tokens)

JavaScript Semicolans at the end of each statement (optional if one statement to a line! A = 5; B = 6; A = 5 B = 6

JavaScript Comments // till the End of Line /* */

HTML Tag Set

Code JavaScript 1] document.write(‘Hello World’)! 2] multiple tags 3] Factorial solution

J1.html document.write ("Hello World"); JavaScript Page

J2.html document.write ("Hello World"); Welcome to the Web document.write ("ByeBye World");

J3.html document.write(' Factorial Page '); for (i=1, Fact=1; i <= 10;i +=1, Fact *= i) { document.write (i + '! = ' + Fact); document.write (' '); }

If JavaScript could only do simple program, such as Factorial, we would not bother with it! Power: browser & document based objects document.write()

Several different JavaScript objects have control over the browser! The JavaScript event handler can enable the user to control the actions and directions of the browser!

The FORM object is very important in JavaScript interaction! Button, Checkbox, Hidden, Radio, Reset, Select, Password, Text, Text Object, etc.

CGI? Traditional HTML forms were used with CGI scripts. JavaScript is more platform independent and is more practical in some cases!

CGI vs JS Calculator App Using CGI, the server would have to be contacted each time the user clicked a button or entered a value! YUK!

Cookies? A Cookie is a term coined by Netscape to represent a chunk of code that is downloaded (from the server) to the client machine. Cookies can be stored temporarily or permanently! They transmit state information, relative to the web, back and forth with the original server! Cookies can be good!

Cookies A cookie used to remember the user preferences!

In many cases, the combination of browser control and cookies enable JavaScript to completely replace CGI!

1] can not read from files 2] can not write to files 3] has no graphics support! 4] can not support networking

A document that contains server-side JavaScript is requested by the client! The requested document is generated and compiled, on the server, into binary form and sent to the client! (Efficiency) Has File and Database Object Types!