Web111a_chapt08.ppt HTML: Section 8 JavaScript CGI Programs (Server Side programs) Common Gateway Interface Run on server Communicate with user across.

Slides:



Advertisements
Similar presentations
Introducing JavaScript
Advertisements

JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Java Script Session1 INTRODUCTION.
Introduction to JavaScript
Introduction to PHP MIS 3501, Fall 2014 Jeremy Shafer
The Web Warrior Guide to Web Design Technologies
1 HCI 201 JavaScript - Part 1. 2 Static web pages l Static pages: what we have worked with so far l HTML tags tell the browser what to do with the content.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
JavaScript Friend or Foe?. History of Java and JavaScript Oak and Coffee? ECMAscript European Computer Manufacturers Association JScript?
Tutorial 10 Programming with JavaScript
XP 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial 10.
XP Creating Web Pages with HTML, 3e Prepared by: C. Hueckstaedt, Tutorial 8 1 New Perspectives on Creating Web Pages with HTML Tutorial 8: Programming.
XP Tutorial 1 New Perspectives on JavaScript, Comprehensive1 Introducing JavaScript Hiding Addresses from Spammers.
2012 •••••••••••••••••••••••••••••••••• Summer WorkShop Mostafa Badr
XP 1 JavaScript Creating a Programmable Web Page.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 25 – Perl and CGI (Common Gateway Interface) Outline 25.1 Introduction 25.2 Perl 25.3 String Processing.
Server Side Scripting Norman White. Where do we do processing? Client side – Javascript (embed code in html) – Java applets (send java program to run.
JavaScript Events and Event Handlers 1 An event is an action that occurs within a Web browser or Web document. An event handler is a statement that tells.
Javascript and the Web Whys and Hows of Javascript.
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
Programming with JavaScript (Chapter 10). XP Various things Midterm grades: Friday Winter Career Fair – Thursday, April 28, 2011 (11 am to 3 pm). – MAC.
Week 9 PHP Cookies and Session Introduction to JavaScript.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
1 JavaScript in Context. Server-Side Programming.
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 2: What is JavaScript?
Tutorial 10 Programming with JavaScript. XP Objectives Learn the history of JavaScript Create a script element Understand basic JavaScript syntax Write.
Tutorial 10 Programming with JavaScript
Done by: Hanadi Muhsen1 Tutorial 1.  Learn the history of JavaScript  Create a script element  Write text to a Web page with JavaScript  Understand.
DHTML AND JAVASCRIPT Genetic Computer School LESSON 5 INTRODUCTION JAVASCRIPT G H E F.
Introduction to PHP A user navigates in her browser to a page that ends with a.php extension The request is sent to a web server, which directs the request.
XP Tutorial 10New Perspectives on HTML and XHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial.
Dr. Qusai Abuein1 Internet & WWW How to program Chap.(6) JavaScript:Introduction to Scripting.
JavaScript Syntax, how to use it in a HTML document
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.
JavaScript Scripting language What is Scripting ? A scripting language, script language, or extension language is a programming language.
MCA-401: ADVANCE JAVA 1 DEPTT. OF COMP. SC & APPLICATIONS PREPARED BY : NAVEEN NAGPAL (SENIOR ASSISTANT PROFESSOR)
ECA 225 Applied Interactive Programming1 ECA 225 Applied Online Programming basics.
Client-Side Scripts JavaScript CIS January 2005.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
HTLM Forms CS3505. Form Handling in Browser html User Files out form WEbBROWSErWEbBROWSEr User read response submit Get URL?input html Get file html script.
1 JavaScript. 2 Introduction to JavaScript JavaScript was designed to add interactivity to HTML pages JavaScript is an interpreted programming (means.
XP Tutorial 10 Section 1 1 Programming with JavaScript.
4. Javascript M. Udin Harun Al Rasyid, S.Kom, Ph.D Lab Jaringan Komputer (C-307) Desain.
1 Server versus Client-Side Programming Server-SideClient-Side.
XP 1 JavaScript Creating a Programmable Web Page.
1 JavaScript in Context. Server-Side Programming.
Scripting Languages Client Side and Server Side. Examples of client side/server side Examples of client-side side include: JavaScript Jquery (uses a JavaScript.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
Tutorial 11 1 JavaScript Operators and Expressions.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
JavaScript and AJAX 2nd Edition Tutorial 1 Programming with JavaScript.
XP Tutorial 10New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties.
Creating a Programmable Web Page
WWW and HTTP King Fahd University of Petroleum & Minerals
Tutorial 10 Programming with JavaScript
JavaScript is a programming language designed for Web pages.
New Perspectives on Creating Web Pages with HTML
JavaScript an introduction.
Objectives Insert a script element Write JavaScript comments
WEB PROGRAMMING JavaScript.
Tutorial 10 Programming with JavaScript
JavaScript CS 4640 Programming Languages for Web Applications
Tutorial 10: Programming with javascript
JavaScript Basics What is JavaScript?
JavaScript is a scripting language designed for Web pages by Netscape.
An Introduction to JavaScript
JavaScript CS 4640 Programming Languages for Web Applications
Presentation transcript:

web111a_chapt08.ppt HTML: Section 8 JavaScript CGI Programs (Server Side programs) Common Gateway Interface Run on server Communicate with user across Internet Only programmer can alter the program Administrators can place limitations on user Potential overload of system Too many users at one time accessing programs Numerous languages Java Perl ASP PHP/FI C Can be complicated 8.02

web111a_chapt08.ppt CGI Programs (Server Side Programs) Common Uses Ordering Systems (shopping carts) Credit Card Processing Search Engines Password Protection Web site development by user on-line Client Side Programs Are executed by the browser Less complicated to write and maintain Can be tested locally – does not have to be on the internet Usually more responsive to the user Can do a lot of checking functions Is an interpretative language Most common languages JavaScript VBScript PHP/FI ASP

web111a_chapt08.ppt CGI Programs (Server Side Programs) Common Uses Ordering Systems (shopping carts) Credit Card Processing Search Engines Password Protection Web site development by user on-line Client Side Programs Are executed by the browser Less complicated to write and maintain Can be tested locally – does not have to be on the internet Usually more responsive to the user Can do a lot of checking functions Is an interpretative language Most common languages JavaScript VBScript PHP/FI ASP

web111a_chapt08.ppt Active Server Pages (ASP) code Name: main.asp Note: HTML code embedded with the ASP code It is, at in Fenton, Michigan. = #12:00:00 AM# and Time Good Morning and welcome to The... = #12:00:00 pm# and time Good Afternoon and welcome to The... Good Evening and welcome to The...

web111a_chapt08.ppt JavaScript Simple to use Client side program Script Tag Identifies script type to browser JavaScript code url = name of external program Language = type of script to be executed

web111a_chapt08.ppt Page 8.07: Hiding the script from non JavaScript browsers <!– Hide from non-JavaScript browsers JavaScript program // Stop hiding from older browsers --> JavaScript: ignored by non-JavaScript browsers HTML: comment tag – a non-JavaScript browser will ignore all the statements between the tags //: JavaScript comment tag: A non-JavaScript browser will ignore A JavaScript browser would error as the verbiage is not JavaScript commands Note: no src attribute means the script is built into the HTML document, not coming from an external fi le

web111a_chapt08.ppt LAB: Figure 8-6, Page 8.08 Files are located at F:\Assign\Fulcher\web111a\tutorial JavaScript document.write(“text to the screen – no line return”); document.writeln(“text to the screen with a line return”); May include HTML in JavaScript LAB: Figure 8-7, Page 8.10 Writing a document to the screen 8.08

web111a_chapt08.ppt Working with Variables Variable: a named element in a program that stores information Store/gather information in one part of program to be used in another part Assignment format: (Page 8.11) variabl-ename = data-into-variable; Example: (Page 8.11 – 8.12) Year = 2003; document.write(Year); document.write(“The year is “ + Year); 8.11

web111a_chapt08.ppt Variable Types Numeric: numbers One decimal position allowed Dash (-) allowed to show negative Can do arithmetic with this type String: group of characters Enclosed in quotes (“) Letters of the alphabet Numbers (cannot do arithmetic) Boolean: logical one (yes) or zero (no) only Null: has no value assigned Declaring (creating) Variables Var name-of-variable = value-of-variable; Var Month; variable is null Var Month = “December”; creates and assigns Month = “December”; assigns a value LAB: Figure 8-8, Page

web111a_chapt08.ppt Date/Time Values Format Variable = DateObject.JavaMethod(); Get current date information Variable = new Date(); Example: Today = new Date(); Now, each of the Date Methods can access the date information Figures 8-9, 8-10, Page 8.17 LAB: Figure 8-11, Page

web111a_chapt08.ppt Expressions and Operators Use Variables Values Operators Perform actions within an expression + Increment (add) + Join two elements + to Increment Var ThisMonth = today.getMonth()+1; + to Join elements document.write(“Only “ + DaysLeft + “ days until Christmas”); Arithmetic Operators Figure 8-13, Page

web111a_chapt08.ppt Expressions and Operators Assignment Operators Assign one element (or result) to another element = Most common element1 = element2; += Uncommon Used to concatenate string data Assignment Operators Figure 8-14, Page

web111a_chapt08.ppt Math object and Math Methods Objects: libraries of functions Method: a specific function in an object Math object A set/group of math functions built into the browser program Math method Specific program (function) inside the Math object to handle a specific operation Figure 8-15, Page

web111a_chapt08.ppt JavaScript Functions Series of commands that perform an action (program) function function_name(parameters) { javascript commands; } XmasDays Function Page 8.25 LAB: Figure 8-17 and 8-18, Page