Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.

Similar presentations


Presentation on theme: "Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming."— Presentation transcript:

1 Web Programming Overview

2 Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming language used to create applets (small programs) or stand- alone applications; usually runs on local machine –CGI (Common Gateway Interface): written in a programming language (e.g. C, Perl); runs on server –JavaScript: scripting language embedded in HTML to add dynamic features to Web pages

3 Java and CGI Programming; beyond the scope of this class Can use pre-made applets and scripts in your site allowing you to have interaction in pages. To include a basic applet (in a Web page): Java code is in separate file(s) - class files Need Java-enabled browser

4 Java and CGI CGI code is in separate file(s) that reside in the cgibin directory of the Web server CGI is commonly used for processing forms, counters, guest books as well as other applications CGI scripts are not allowed on your ASU account except for the pre-made ones described at the ASU Web Jukebox

5 JavaScript JavaScript can change the contents of a Web page after it has been rendered by the browser. –Interaction with user through forms and controls –Create visual effects such as animation –Control the Web browser window itself. Need JavaScript-enabled browser to utilize it. Can make your own or use pre-made scripts.

6 JavaScript JavaScript can go in the HTML file: Or be included as a separate code file: The code is executed by a JavaScript interpreter in the browser.

7 JavaScript Javascript can go between the HEAD or BODY tags. Try to include as much of the Javascript as possible in the section as it is processed before the body of the page is displayed.

8 JavaScript Javascript treats many items as objects –Methods: what the object can do / function, e.g. document.write(“Hello”) –Argument: information that can be passed to a method (e.g. a string like “Hello”) –Variables: values that are stored in memory and manipulated (e.g. employeeName) The Document object represents the contents of the browser’s window.

9 JavaScript and Event Handling JavaScript can react to events that happen in the Web browser. Event - an action, usually initiated by the user. –Moving the mouse –Clicking the mouse –Pressing a key When an event occurs, it triggers the execution of JavaScript code.

10 JavaScript Events include: onMouseOver - when the mouse is over a particular item onMouseOut - when the mouse moves out of a particular area onClick - when the mouse clicks on a particular item onKeyDown - when a key on the keyboard is pressed


Download ppt "Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming."

Similar presentations


Ads by Google