Simple Java Forms Dr. Robert L. Probert S.I.T.E., University of Ottawa.

Slides:



Advertisements
Similar presentations
1 What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language A scripting language is a lightweight.
Advertisements

23-Aug-14 HTML/XHTML Forms. 2 What are forms? is just another kind of XHTML/HTML tag Forms are used to create (rather primitive) GUIs on Web pages Usually.
24-Aug-14 HTML Forms. 2 What are forms? is just another kind of HTML tag HTML forms are used to create (rather primitive) GUIs on Web pages Usually the.
Computer and Communication Fundamental Basic web programming Lecture 8 Rina Zviel-Girshin.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 - JavaScript: Introduction to Scripting Outline 7.1 Introduction 7.2 Simple Program: Printing.
Images, Tables, lists, blocks, layout, forms, iframes
1 Javascrbipt Intro Javascript (or js) is a programming language. Interpreted, not compiled. Not the same as java, but, similar. Use tags to use. Object-oriented.
Basic HTML. Guide to HTML code Not case sensitive Use tag for formatting output: new line, paragraph, text size, color, font type, etc. Can be a single.
Information Technology Center Hany Abdelwahab Computer Specialist.
There is a certain way that an HTML file should be set up. The HTML section declares a beginning and an ending. Within the HTML, there should be a HEAD.
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
Web Programming Material From Greenlaw/Hepp, In-line/On-line: Fundamentals of the Internet and the World Wide Web 1 Introduction The JavaScript Programming.
HTML & CSS A brief introduction. OUTLINE 1.What is HTML? 2.What is CSS? 3.How are they used together? 4.Troubleshooting/Common problems 5.More resources.
HTML, Third Edition--Illustrated Introductory 1 HTML, Third Edition Illustrated Introductory Unit F Working with Tables.
Web Design Using HTML Codes. WHAT DO I NEED TO BEGIN DESIGNING A HOME PAGE? 1.YOU NEED A FOLDER (also called a DIRECTORY) You should set up a folder or.
Chapter 3 Using Validation Controls. What is a Validation Control? A control that validates the value in another control Renders as an HTML tag with an.
HTML basics exercises.
INE1020 Introduction to Internet Engineering Tutorial 8 All about Lab 6.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
225 City Avenue, Suite 106 Bala Cynwyd, PA , phone , fax presents… HTML Lists, Tables and Forms v2.0.
JavaScript Part 1.
JavaScript Informatics for economists I. Introduction Programming language used in web pages. Simple and easy to use – written in HTML document. Client.
Dr. Nuha El-KhaliliInternet Programming ( ) HTML Hyper Text Markup Language The language of web pages Maintained by the W3C
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
1 HTML محمد احمدی نیا 2 Of 43 What is HTML?  HTML stands for Hyper Text Markup Language  HTML is not a programming language, it.
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.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
G053 - Lecture 16 Validating Forms Mr C Johnston ICT Teacher
Client Side Programming with JavaScript Why use client side programming? Web sides built on CGI programs can rapidly become overly complicated to maintain,
Introduction To HTML.  HTML stands for Hyper Text Markup Language.  HTML was developed by Tim Berners-Lee.  HTML is maintained by World Wide Web Consortium(W3C).
HTML FORMS GET/POST METHODS. HTML FORMS HTML Forms HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes,
Creating a Web Site Using 000webhost.com The 000webhost.com Site You will be required to create an account in order to use their host computer 000webhost.com.
HTML— More Tags, Formatting, and Lists. Formatting Tags  Bold  Italics  Underline  Big text  Small text  Subscript (H 2 O)  Superscript (10 3 )
CIS234A- Lecture 7 Instructor Greg D’Andrea. Tables A table can be displayed on a Web page either in a text or graphical format. A text table: – contains.
Java server pages. A JSP file basically contains HTML, but with embedded JSP tags with snippets of Java code inside them. A JSP file basically contains.
HTML ( HYPER TEXT MARK UP LANGUAGE ). What is HTML HTML describes the content and format of web pages using tags. Ex. Title Tag: A title It’s the job.
JavaScript Syntax, how to use it in a HTML document
JavaScript - Basic Concepts Prepared and Presented by Hienvinh Nguyen, Afshin Tiraie.
44238: Dynamic Web-site Development Client Side Programming Ian Perry Room:C48 Extension:7287
JavaScript Introduction.  JavaScript is a scripting language  A scripting language is a lightweight programming language  A JavaScript can be inserted.
HTML (Hyper Text Markup Language) Lecture II. Review Writing HTML files for web pages – efficient compact – fundamental. Text files with htm extension.
Making dynamic pages with javascript Lecture 1. Java script java versus javascript Javascript is a scripting language that will allow you to add real.
Event Handling. Objectives Using event handlers Simulating events Using event-related methods.
 2001 Prentice Hall, Inc. All rights reserved. Chapter 7 - Introduction to Common Gateway Interface (CGI) Outline 7.1Introduction 7.2A Simple HTTP Transaction.
Basic HTML.
20-753: Fundamentals of Web Programming 1 Lecture 6: Advanced HTML Fundamentals of Web Programming Lecture 6: Advanced HTML.
LESSON : EVENTS AND FORM VALIDATION -JAVASCRIPT. EVENTS CLICK.
CSD 340 (Blum)1 Introducing Text Input elements and Ifs.
HTML Elements: Forms and Controls Chapter 9 B. Ramamurthy.
HTML Structure II (Form) WEEK 2.2. Contents Table Form.
HTML Tables Tables are defined with the tag. A table is divided into rows (with the tag), and each row is divided into data cells (with the tag). td stands.
HTML Help book. HTML HTML is the programming language used to make web pages for the Internet. HTML stands for Hyper Text Markup Language. HTML is made.
Client-side (JavaScript) Validation. Associating a function with a click event – Part 1 Use the input tag’s onclick attribute to associate a function.
Chapter 7 - Introduction to Common Gateway Interface (CGI)
CNIT 131 HTML5 - Tables.
Style Sheets.
JavaScript.
JavaScript functions.
Getting web pages First we need to get the webpage by issuing a HTTP request. The best option for this is the requests library that comes with Anaconda:
Of HTML, CSS and JavaScript
Javascript Game Assessment
In Class Programming BIS1523 – Lecture 11.
The Web Wizard’s Guide To JavaScript
JavaScript What is JavaScript? What can JavaScript do?
JavaScript What is JavaScript? What can JavaScript do?
For this assignment, copy and past the XHTML to a notepad file with the .html extension. Then add the code I ask for to complete the problems.
Tutorial 10: Programming with javascript
Introduction to JavaScript
Web Programming and Design
Presentation transcript:

Simple Java Forms Dr. Robert L. Probert S.I.T.E., University of Ottawa

2 If you load up login.htm from the CSI 4118 notes page, and you go to “View, Source” on the menu, you will be able to see the HTML and Javascript code that makes up the page. In these slides we look at what each part of this script does. Javascript Example

3 This lets the browser know that coming up is a script of the type javascript function go() Declares a function named go { var user = document.form.user.value; declares a variable named ‘user’, and sets the variable to the value contained in document.form.user.value var pass = document.form.pass.value; declares a variable named ‘pass’, and sets the variable to the value contained in document.form.pass.value

4 if ( pass != "password" || user!="csi4118" ) {location = "wrongpass.htm"; } else { location = "studentmarks.xls" } This is an if statement that compares the data contained in the variables pass and user to the user name and password that are required to successfully log in. If the statement is true (if the password does NOT equal pass, OR if the username does NOT equal csi4118) then the script loads up the wrongpass.htm page. Otherwise, the user has put in the correct information, and is sent to the student marks page.

5 </script> This lets the browser know that the script is finished. Indicates that the body of the document is coming after this statement. It also sets the colors of the background and text. Indicates that a form is coming, and that the form’s name is ‘form’. The form can be accessed from the script as ‘document.form’

6 Sets the font to verdana indicates a new line. indicates that everything after this tag is centered. indicates a new line. indicates that everything after this tag is centered. Creates a table with a green background and no border.

7 <tr><td> TR stands for table row. TD stands for table data. We are now declaring the information and appearance of the table. User: User: This is the text that will appear next to the User field.

8 </td><td> Indicates a normal textfield and that the textfield’s name is ‘user’. The textfield can be accessed from the script as ‘document.form.user’. You will note that in the script, the text that has been typed into the textfield is accessed as ‘document.form.user.value’ You will note that in the script, the text that has been typed into the textfield is accessed as ‘document.form.user.value’

9 </td></tr><tr><td> Pass: Pass: This is the text that will appear next to the Password field.

10 </td><td> Indicates a password textfield (password textfields are obscured with * characters) and that the textfield’s name is ‘pass’. The textfield can be accessed from the script as ‘document.form.pass’. You will note that in the script, the text that has been typed into the textfield is accessed as ‘document.form.pass.value’

11 </td></tr> Indicates a button and that the button’s name is ‘login’. When the button is pressed, the onclick function go() is called. </td></tr></table> Indicates the end of the table.

12 </CENTER> Indicates the end of centering. </font> Indicates the end of the font verdana. </form> Indicates the end of the form.