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.

Slides:



Advertisements
Similar presentations
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Advertisements

The Web Warrior Guide to Web Design Technologies
JavaScript- Processing HTML Forms. Event Handlers Begins with and ends with.
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
HTML Markup language - controls appearance and content of a document Javascripts Various HTML tags.
MSc. Publishing on WWW JavaScript. What is JavaScript? A scripting language devised by Netscape Adds functionality to web pages by: Embedding code into.
JavaScript 101 Lesson 5: Introduction to Events. Lesson Topics Event driven programming Events and event handlers The onClick event handler for hyperlinks.
Introduction to Javascript. Web Page Technologies To create Web Page documents, you use: To create Web Page documents, you use: HTML – contents and structures.
Introduction to JavaScript. Aim To enable you to write you first JavaScript.
4.1 JavaScript Introduction
JavaScript Teppo Räisänen LIIKE/OAMK HTML, CSS, JavaScript HTML defines the structure CSS defines the layout JavaScript is used for scripting It.
CS346 - Javascript 1, 21 Module 1 Introduction to JavaScript CS346.
KRAD makes it easy to handle HTML events in your webpage. Kuali University: Apply Now Lab 6: Fun with HTML Events Lab Objectives HTML Events – what are.
CSC318 – DYNAMIC WEB APPLICATION DEVELOPMENT
JavaScript Defined DOM (Document Object Model) General Syntax Body vs. Head Variables Math & Logic Selection Functions & Events Loops Animation Getting.
Event Handlers CS101 Introduction to Computing. Learning Goals Learn about event handlers Determine how events are useful in JavaScript Discover where.
Bridges To Computing General Information: This document was created for use in the "Bridges to Computing" project of Brooklyn College. You are invited.
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
JavaScript is a client-side scripting language. Programs run in the web browser on the client's computer. (PHP, in contrast, is a server-side scripting.
DHTML: Dynamic HTML Internet Technology1. What is DHTML? A collection of enhancements to HTML ► To create dynamic and interactive websites Combination.
JSP Java Server Pages Softsmith Infotech.
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.
Javascript. Outline Introduction Fundamental of JavaScript Javascript events management DOM and Dynamic HTML (DHTML)
Client Side Programming with JavaScript Why use client side programming? Web sides built on CGI programs can rapidly become overly complicated to maintain,
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 2: What is JavaScript?
An Introduction to JavaScript Summarized from Chapter 6 of “Web Programming: Building Internet Applications”, 3 rd Edition.
 2003 Prentice Hall, Inc. All rights reserved. CHAPTER 3 JavaScript 1.
Client-Side Scripting JavaScript.  produced by Netscape for use within HTML Web pages.  built into all the major modern browsers. properties  lightweight,
Dynamic Web Pages & JavaScript. Dynamic Web Pages Dynamic = Change Dynamic Web Pages are web pages that change. More than just moving graphics around.
Introduction to Javascript. What HTML Can & Can Not Do HTML Can HTML Can Display text Display text Display images Display images Display even animated.
Introduction.  The scripting language most often used for client-side web development.  Influenced by many programming languages, easier for nonprogrammers.
JavaScript - A Web Script Language Fred Durao
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
Dr. Qusai Abuein1 Internet & WWW How to program Chap.(6) JavaScript:Introduction to Scripting.
1 JavaScript
An Introduction to JavaScript By: John Coliton Tuesday, November 10, 1998 Center for Teaching and Learning.
Introduction to JavaScript CS101 Introduction to Computing.
44238: Dynamic Web-site Development Client Side Programming Ian Perry Room:C48 Extension:7287
JavaScript Scripting language What is Scripting ? A scripting language, script language, or extension language is a programming language.
Sahar Mosleh California State University San MarcosPage 1 JavaScript Basic.
CSC318 – DYNAMIC WEB APPLICATION DEVELOPMENT BY: SITI NURBAYA ISMAIL FACULTY of COMPUTER and MATHEMATICAL SCIENCES.
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.
COMP403 Web Design JAVA SCRİPTS Tolgay KARANFİLLER.
HTML JAVASCRIPT. CONTENTS Javascript Example NOSCRIPT Tag Advantages Summary Exercise.
HTML Overview Part 5 – JavaScript 1. Scripts 2  Scripts are used to add dynamic content to a web page.  Scripts consist of a list of commands that execute.
CIS 375—Web App Dev II JavaScript I. 2 Introduction to DTD JavaScript is a scripting language developed by ________. A scripting language is a lightweight.
WDMD 170 – UW Stevens Point 1 WDMD 170 Internet Languages eLesson: Variables, Functions and Events (NON-Audio version) © Dr. David C. Gibbs WDMD.
JavaScript Defined DOM (Document Object Model) General Syntax Body vs. Head Variables Math & Logic Selection Functions & Events Loops Animation Getting.
CIS 3.5 Lecture 2.3 "Introduction to JavaScript".
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.
Event Handling (the right way). A Simple Web Page Events - Summary The web page looks like this:
Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
JavaScript Events Java 4 Understanding Events Events add interactivity between the web page and the user You can think of an event as a trigger that.
Web Programming Java Script-Introduction. What is Javascript? JavaScript is a scripting language using for the Web. JavaScript is a programming language.
Brief Look InTo JavaScript Dr. Thomas Hicks Computer Science Department Trinity University.
JavaScript Part 1 Introduction to scripting The ‘alert’ function.
Using JavaScript to Show an Alert
Donna J. Kain, Clarkson University
Web Development & Design Foundations with HTML5 7th Edition
Introduction to JavaScript
DHTML Javascript Internet Technology.
Your 1st Programming Assignment
WEB PROGRAMMING JavaScript.
DHTML Javascript Internet Technology.
Introduction to JavaScript
Tutorial 10: Programming with javascript
Introduction to Programming and JavaScript
Presentation transcript:

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 programming tool It is embedded within an HTML page JavaScript is case- sensitive What it does? Allows interactive computing at the client level Supported by IE, Netscape, firefox etc. Dynamically changes HTML Reacts to events Read and write HTML elements Validates data

Hello World Example document.write(" Hello World! This is Me "); Begins with and ends with

Another Hello World Example alert("Hello World");

Where can you put JavaScript?  You can have more than one element  Can be placed anywhere inside body or head of the html document.  Commands in javascript are case sensitive.

Exercise 10: jex1.html confirm("Do you want to copy the files?"); Note the difference between ALERT and COFIRM

How to put comments? // This is single line comments /* this is multi-line comments especially if you like to babble along */ document.write("Hello Me"); Learn to comment your scripts

Creating an interactive page  Use of event programming.  An event is anything that happens to an object or element of an object. Click on a button: click event Select some text: select event Mouse hovering over: mouseover event  When an event happen, we need to have an event handler.

Let us create a simple button Hey you are in luck. Do you need a date for valentine’s day? <input type= " button " name= " button1 " value= " Yes! I need a date " /> Type of GUI The text that appear on the button Button Identifier

Add event programming - body. Hey you are in luck.. Do you need a date for valentine’s day? <input type="button" name="button1" value="Yes! I need a date" onclick="displayMyMessage()"/> Event Handler: onclick="displayMyMessage() "

Add event programming - head. Interactive Web Page function displayMyMessage(){ alert("Sorry! Can’t help you today!"); } displayMyMessage: This is a javaScript function declared inside the “head” section

Declaring functions in head  Most event programming handlers activate some form of javascript functions that is declared in the “head”  We’ll start to do that immediately.  Good Practice.  You declare the function, and you write a series of instructions of “what to do”  In this case, we are just “displaying” a message with a “alert” box.

Exercise 11: jex2.html  Make a page that have two buttons.  It also has two javascript functions declared.  If you press on one button, one of the functions will be called (activated). If you press the other button, the other function will be called instead. Interactive Web Page function displayMyMessage1(){ } function displayMyMessage2(){ }