Internet Technologies

Similar documents
HTML Forms. Pat Morin COMP 2405

HTML Forms and CONTROLS

JavaScript and Dreamweaver Examples

Further web design: HTML forms

<option> eggs </option> <option> cheese </option> </select> </p> </form>

2- Forms and JavaScript Course: Developing web- based applica<ons

HTML Form Widgets. Review: HTML Forms. Review: CGI Programs

07 Forms. 1 About Forms. 2 The FORM Tag. 1.1 Form Handlers

CS412 Interactive Lab Creating a Simple Web Form

Web Design and Development ACS Chapter 13. Using Forms 11/30/2015 1

HTML Tables. IT 3203 Introduction to Web Development

c. Write a JavaScript statement to print out as an alert box the value of the third Radio button (whether or not selected) in the second form.

Working with forms in PHP

PHP Form Handling. Prof. Jim Whitehead CMPS 183 Spring 2006 May 3, 2006

Dynamic Web-Enabled Data Collection

Introduction to XHTML. 2010, Robert K. Moniot 1

CREATING WEB FORMS WEB and FORMS FRAMES AND

Configuring iplanet 6.0 Web Server For SSL and non-ssl Redirect

Viewing Form Results

Inserting the Form Field In Dreamweaver 4, open a new or existing page. From the Insert menu choose Form.

Intell-a-Keeper Reporting System Technical Programming Guide. Tracking your Bookings without going Nuts!

FORMS. Introduction. Form Basics

FORM-ORIENTED DATA ENTRY

CGI Programming. What is CGI?

Web Development 1 A4 Project Description Web Architecture

Tutorial 6 Creating a Web Form. HTML and CSS 6 TH EDITION

By Glenn Fleishman. WebSpy. Form and function

Forms, CGI Objectives. HTML forms. Form example. Form example...

Upload Center Forms. Contents. Defining Forms 2. Form Options 5. Applying Forms 6. Processing The Data 6. Maxum Development Corp.

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Dreamweaver Tutorials Creating a Web Contact Form

XHTML Forms. Form syntax. Selection widgets. Submission method. Submission action. Radio buttons

Using Form Tools (admin)

Now that we have discussed some PHP background

Designing and Implementing Forms 34

Chapter 5 Configuring the Remote Access Web Portal

Client-side Web Engineering From HTML to AJAX

Website Login Integration

Website Planning Checklist

In order for the form to process and send correctly the follow objects must be in the form tag.

PHP Tutorial From beginner to master

Linklok URL TM V2.90

Introduction to Web Design Curriculum Sample

People Data and the Web Forms and CGI. HTML forms. A user interface to CGI applications

Novell Identity Manager

Cover Page. Dynamic Server Pages Guide 10g Release 3 ( ) March 2007

Implementing Specialized Data Capture Applications with InVision Development Tools (Part 2)

A send-a-friend application with ASP Smart Mailer

Real SQL Programming 1

Apply PERL to BioInformatics (II)

CGI.pm Tutorial. Table of content. What is CGI? First Program

Short notes on webpage programming languages

2. Follow the installation directions and install the server on ccc

XHTML BASICS. Institute of Finance Management CIT Department Herman Mandari

How to Make a Working Contact Form for your Website in Dreamweaver CS3

Setup Guide

InPost UK Limited GeoWidget Integration Guide Version 1.1

InternetVista Web scenario documentation

PHP Authentication Schemes

Manual for CKForms component Release 1.3.4

Sample HP OO Web Application

Chapter 2: Interactive Web Applications

The tool also provides an overview of date criteria set against all items within your module.

Dynamic Content. Dynamic Web Content: HTML Forms CGI Web Servers and HTTP

Web Programming with PHP 5. The right tool for the right job.

PDG Software. Site Design Guide

GOOGLE DOCS APPLICATION WORK WITH GOOGLE DOCUMENTS

A MODEL FOR THE AUTOMATION OF HTML FORM CREATION AND VALIDATION. Keywords: html, form, web, automation, validation, class, model.

JavaScript: Introduction to Scripting Pearson Education, Inc. All rights reserved.

Lesson Review Answers

How to Schedule Report Execution and Mailing

Chapter 2 HTML Basics Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D

Step by step guides. Deploying your first web app to your FREE Azure Subscription with Visual Studio 2015

Customizing Confirmation Text and s for Donation Forms

Fortigate SSL VPN 4 With PINsafe Installation Notes

Your First Web Page. It all starts with an idea. Create an Azure Web App

JavaScript: Arrays Pearson Education, Inc. All rights reserved.

TCP/IP Networking, Part 2: Web-Based Control

The Basics of Dynamic SAS/IntrNet Applications Roderick A. Rose, Jordan Institute for Families, School of Social Work, UNC-Chapel Hill

Using The HomeVision Web Server

ADOBE ACROBAT 7.0 CREATING FORMS

ABSTRACT INTRODUCTION %CODE MACRO DEFINITION

New Online Banking Guide for FIRST time Login

Configuring Custom Fields in JEvents Club Addon

PloneSurvey User Guide (draft 3)

Funeral Home Software Instruction Manual

Perl/CGI. CS 299 Web Programming and Design

Terminal Four. Content Management System. Moderator Access

HDAccess Administrators User Manual. Help Desk Authority 9.0

JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. Web Design in Nvu Workbook 1

Hello World RESTful web service tutorial

Transcription:

QAFQAZ UNIVERSITY Computer Engineering Department Internet Technologies HTML Forms Dr. Abzetdin ADAMOV Chair of Computer Engineering Department aadamov@qu.edu.az http://ce.qu.edu.az/~aadamov

What are forms? <form> is just another kind of HTML tag HTML forms are used to create (rather primitive) GUIs on Web pages Usually the purpose is to ask the user for information The information is then sent back to the server A form is an area that can contain form elements The syntax is: <form parameters>...form elements... </form> Form elements include: buttons, checkboxes, text fields, radio buttons, drop-down menus, etc Other kinds of HTML tags can be mixed in with the form elements A form usually contains a Submit button to send the information in he form elements to the server The form s parameters tell JavaScript how to send the information to the server (there are two different ways it could be sent) Forms can be used for other things, such as a GUI for simple programs 2

Forms and JavaScript The JavaScript language can be used to make pages that do something You can use JavaScript to write complete programs, but... Usually you just use snippets of JavaScript here and there throughout your Web page JavaScript code snippets can be attached to various form elements For example, you might want to check that a zipcode field contains a 5-digit integer before you send that information to the server Microsoft sometimes calls JavaScript active scripting HTML forms can be used without JavaScript, and JavaScript can be used without HTML forms, but they work well together JavaScript for HTML is covered in a Web Design and Programming course (1-st Semester) 3

The <form> tag The <form arguments>... </form> tag encloses form elements (and probably other HTML as well) The arguments to form tell what to do with the user input action="url" (required) Specifies where to send the data when the Submit button is clicked method="get" (default) Form data is sent as a URL with?form_data info appended to the end Can be used only if data is all ASCII and not more than 512 characters method="post" Form data is sent in the body of the URL request Cannot be bookmarked by most browsers target="target" Tells where to open the page sent as a result of the request target= _blank means open in a new window target= _top means use the same window 4

The <input> tag Most, but not all, form elements use the input tag, with a type="..." argument to tell which kind of element it is type can be text, checkbox, radio, password, hidden, submit, reset, button, file, or image Other common input tag arguments include: name: the name of the element value: the value of the element; used in different ways for different values of type readonly: the value cannot be changed disabled: the user can t do anything with this element Other arguments are defined for the input tag but have meaning only for certain values of type 5

Text input A text field: <input type="text" name="textfield" value="with an initial value"> A multi-line text field <textarea name="textarea" cols="24" rows="2">hello</textarea> A password field: <input type="password" name="textfield3" value="secret"> Note that two of these use the input tag, but one uses textarea 6

Buttons A submit button: <input type="submit" name="submit" value="submit"> A reset button: <input type="reset" name="submit2" value="reset"> A plain button: <input type="button" name="submit3" value="push Me"> submit: send data Note that the type is input, not button reset: restore all form elements to their initial state button: take some action as specified by JavaScript 7

Checkboxes A checkbox: <input type="checkbox" name="checkbox value="checkbox" checked> type: "checkbox" name: used to reference this form element from JavaScript value: value to be returned when element is checked Note that there is no text associated with the checkbox you have to supply text in the surrounding HTML 8

Radio buttons Radio buttons:<br> <input type="radio" name="radiobutton" value="myvalue1"> male<br> <input type="radio" name="radiobutton" value="myvalue2" checked> female If two or more radio buttons have the same name, the user can only select one of them at a time This is how you make a radio button group If you ask for the value of that name, you will get the value specified for the selected radio button As with checkboxes, radio buttons do not contain any text 9

Drop-down menu or list A menu or list: <select name="select"> <option value="red">red</option> <option value="green">green</option> <option value="blue">blue</option> </select> Additional arguments: size: the number of items visible in the list (default is "1") multiple: if set to "true", any number of items may be selected (default is "false") 10

Hidden fields <input type="hidden" name="hiddenfield" value="nyah"> <-- right there, don't you see it? What good is this? All input fields are sent back to the server, including hidden fields This is a way to include information that the user doesn t need to see (or that you don t want her to see) The value of a hidden field can be set programmatically (by JavaScript) before the form is submitted 11

A complete example <html> <head> <title>get Identity</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> </head> <body> <p><b>who are you?</b></p> <form method="post" action=""> <p>name: <input type="text" name="textfield"> </p> <p>gender: <input type="radio" name="gender" value="m">male <input type="radio" name="gender" value="f">female</p> </form> </body> </html> 12

Form Elements - Example 13

Form Elements - Example <input type=text name=person size = 40 value="bob"> 14

Form Elements - Example <input type=checkbox name=rude> 15

Form Elements - Example <input type=radio name=size value = "small"> Small <br> <input type=radio name=size value = "medium" checked>medium<br> <input type=radio name=size value = "large"> Large 16

Form Elements - Example <select name = "animal"> <option>stoat <option selected>goat <option>weasel </select> 17

Form Elements - Example <select name = "color" size=8> <option>red <option selected>blue <option>green <option>purple <option>gray </select> 18

Form Elements - Example <textarea name=comments rows=4 cols=60 wrap> </textarea> 19

Form Elements - Example <form action=http://localhost/cgi-bin/dumpform.pl method=post> <input type=text name=person size = 40 value="bob"> <input type=submit name=sub value="submit Insult Request via POST"> </form> 20

The End 21