Web Programming– UFCFB Lecture 10

Slides:



Advertisements
Similar presentations
Tables Tables provide a means of organising the layout of data
Advertisements

WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Chapter 12 Working with Forms Principles of Web Design, 4 th Edition.
Supplement Creating Forms. Objectives Show how forms are used How to create the Form element HTML elements used for creating input fields.
Creating Web Page Forms. Objectives Describe how Web forms can interact with a server-based program Insert a form into a Web page Create and format a.
Forms Review. 2 Using Forms tag  Contains the form elements on a web page  Container tag tag  Configures a variety of form elements including text.
Images. Tables. Frames. Forms. DMFD F2007 IT University of Copenhagen
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Table, Forms, Metatags and Frames.
Creating Web Page Forms
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Chapter 10 Form Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Chapter 9 Working with Forms. Principles of Web Design 2nd Ed. Chapter 9 2 Principles of Web Design Chapter 9 Objectives Understand how forms work Understand.
Principles of Web Design 6 th Edition Chapter 11 – Web Forms.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
XP Tutorial 6New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Creating Web Page Forms Designing a Product Registration Form Tutorial.
1 Creating Web Forms in HTML Web forms collect information from customers Web forms include different control elements including: –Input boxes –Selection.
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
1 HTML References: A HTML Tutorial: /HTMLPrimer.html
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
CSC 2720 Building Web Applications HTML Forms. Introduction  HTML forms are used to collect user input.  The collected input is typically sent to a.
Working with Forms. How Forms Work Forms let you build interactive Web pages that collect information from a user and process it on the Web server The.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Chapter 9 Publishing and Maintaining Your Site. 2 Principles of Web Design Chapter 9 Objectives Understand the features of Internet Service Providers.
Week 11 Creating Framed Layouts Objectives Understand the benefits and drawbacks of frames Understand and use frame syntax Customize frame characteristics.
HTML Forms.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
Introduction to HTML Part 3 Chapter 2. Learning Outcomes Identify how to design frames. Explain frames’ attributes. Describe the method on designing forms.
Week 9 - Form Basics Key Concepts 1. 1.Describe common uses of forms on web pages 2.Create forms on web pages using the form, input, textarea, and select.
76 © 1998, 1999, 2000 David T. Gray, Howard Duncan, Jane Kernan Frames When displaying information in a browser, it is sometimes useful to divide the display.
ITCS373: Internet Technology Lecture 5: More HTML.
Week 12 Working with Forms Objectives Understand how forms work Understand form syntax Create input objects Build forms within tables Build and.
Creating Web Page Forms. Introducing Web Forms Web forms collect information from users Web forms include different control elements including: –Input.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
+ FORMS HTML forms are used to pass data to a server. begins and ends a form Forms are made up of input elements Every input element has a name and value.
Project 6 Creating Forms on a Web Page. Objectives Define terms related to forms Describe the different form controls and their uses Use the tag Create.
Netprog CGI and Forms1 CGI and Forms A detailed look at HTML forms.
HTML Forms.
Creating Forms on a Web Page. 2 Introduction  Forms allow Web developers to collect visitor feedback  Forms create an environment that invites people.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
HTML III (Forms) Robin Burke ECT 270. Outline Where we are in this class Web applications HTML Forms Break Forms lab.
HTML Structure II (Form) WEEK 2.2. Contents Table Form.
Ashima Wadhwa Java Script And Forms. Introduction Forms: –One of the most common Web page elements used with JavaScript –Typical forms you may encounter.
XP Tutorial 6New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
2440: 141 Web Site Administration Web Forms Instructor: Joseph Nattey.
Tutorial 6 Working with Web Forms
In this session, you will learn to:
How to Write Web Forms By Mimi Opkins.
HTML Forms Pat Morin COMP 2405.
ITE 115 Creating Web Page Forms
Basic XHTML Tables XHTML tables—a frequently used feature that organizes data into rows and columns. Tables are defined with the table element. Table.
Chapter 5 Introduction to XHTML: Part 2
ARUSHA TECHNICAL COLLEGE WEB DESIGN(html forms)
Designing Forms Lesson 10.
HTML: Basic Tags & Form Tags
Creating Form Elements
Web Development & Design Foundations with H T M L 5
FORM OBJECT When creating an interactive web site for the Internet it is necessary to capture user input and process this input. Based on the result of.
CNIT 131 HTML5 - Forms.
Principles of Web Design 5th Edition
Creating Forms on a Web Page
© Hugh McCabe 2000 Web Authoring Lecture 8
Lesson 6: Web Forms.
Unit 5 Create Forms.
HTML: Basic Tags & Form Tags
Presentation transcript:

Web Programming– UFCFB3-30-1 Lecture 10 Instructor : Mazhar H Malik Email : mazhar@gcet.edu.om Global College of Engineering and Technology

Lecture 10 Frames and Forms LO 2,5,6 9/11/2018 Lecture 10

Objectives Understand Frames. Frames syntax. Frames good and bad. Understand how forms work Understand form syntax Create input objects Build forms within tables 9/11/2018 Lecture 10

Frames HTML can divide web page into areas called frames. Each frame is loaded as a separate file, increasing processing overhead and slowing down loading. 9/11/2018 Lecture 10

Frames Problem: Solution: Frame You want the same navigation on every page. Solution: Create two areas, one navigation the other content Frame Layout – Rows and Columns 9/11/2018 Lecture 10

Frame layout Columns and Rows <FRAMESET cols="33%,67%" rows="*,200"> <FRAME src="contents_of_frame1.html"> <FRAME src="contents_of_frame2.gif"> <FRAME src="contents_of_frame3.html"> <FRAME src="contents_of_frame4.html"> </FRAMESET> 9/11/2018 Lecture 10

Basic setup A framed window is set up using an HTML file which contains <frameset> … </frameset> in place of its body. Within the (possibly nested) frameset, individual <frame> tags specify the URL of each frame. A <noframes> container gives alternative unframed content. 9/11/2018 Lecture 10

Nesting frames A basic frameset only allows you to specify a certain number of rows and/or columns. This gives, at best, a grid (though the relative sizes of the elements can be set). In order to get more complex frame arrangements, nested framesets have to be used. 9/11/2018 Lecture 10

Frame attributes The basic visual attributes of a frame which can be controlled are: Borders: the default gives a 3D border. This can be set at either the frameset, or frame level. Officially the latter is preferred, but causes consistency issues. Scrollbars: by default frames are scrollable. If the amount of text which will be placed in a frame is fixed (and small enough), you may wish to disable scrollbars for that frame. Resizing: by default the user can resize any or all of the frames displayed in their browser. If using frames for visual formatting you may want to override this! 9/11/2018 Lecture 10

Targeting frames Each frame can be given a name which identifies it within its frameset. Links in other frames of the frameset can then be given a target attribute. This specifies (by name) the frame in which the link should be opened. Special target names: _blank: Open in a new window _parent: Links one level up the frameset hierarchy. Unfortunately this requires the framesets to be nested in separate documents. _top: bust out of the frameset entirely. 9/11/2018 Lecture 10

The good Frames are the ideal mechanism when scrolling is needed for content, but navigation shouldn’t change. They also allow separation of conceptually different parts of the document. Particularly combined with CSS this can produce very clean and tight html files. 9/11/2018 Lecture 10

The bad Frames mess up navigation. Back buttons may not work properly. You may get trapped in the framed site. Search engines can’t/don’t index framed documents properly (they find the frame but not the frameset). Each frame is loaded as a separate file, increasing processing overhead and slowing down loading. 9/11/2018 Lecture 10

Conclusions Use frames sparingly. Frames are ideal for reference pages, where you expect the user to make repeated access to parts of a document (e.g. the JAVA API)‏ Common recommendation is to use frames for internal sites (intranet) only. 9/11/2018 Lecture 10

Understanding How Forms Work Forms let you build interactive Web pages that collect information from a user and process it on the Web server The HTML form is the interface for the user to enter data The data is processed by applications that reside on the Web server 9/11/2018 Lecture 10

9/11/2018 Lecture 10

Using CGI Scripts The Common Gateway Interface (CGI) is the communications “bridge” between the Internet and the server Using programs called scripts, CGI can collect data sent by a user via the Hypertext Transfer Protocol (HTTP) and transfer it to a variety of data processing programs including spreadsheets, databases, or other software running on the server 9/11/2018 Lecture 10

Using the <form> element The <form> element is the container for creating a form. A variety of attributes describe how the form data will be handled. 9/11/2018

Using the <form> element The following code shows a typical <form> element: <form action=http://www.website.com/ cgi_bin/script.cgi method=”post”> 9/11/2018 Lecture 10

Creating Input Objects The <input> element defines many of the form input object types The type attribute specifies the type of input object 9/11/2018 Lecture 10

9/11/2018 Lecture 10

Creating Text Boxes The text box is the most commonly used form element. <input type="text" name="firstname" size="20" maxlength="35" value="First Name"> 9/11/2018 Lecture 10

Creating Check Boxes Check boxes are an on/off toggle that the user can select. <input type="checkbox" name="species" value="smbass"> Smallmouth Bass 9/11/2018 Lecture 10

Creating Radio Buttons Radio buttons are like checkboxes, but only one selection is allowed. <input type="radio" name="list" value="yes" checked> Yes 9/11/2018 Lecture 10

Creating Submit & Reset Buttons The submit and reset buttons let the user choose whether to send the form data or start over. <input type="submit" value="Submit your answers"> <input type="reset" value="Clear the form"> 9/11/2018 Lecture 10

Creating an Image for the Submit Button You can choose an image file and use it instead of the default submit button. <input type="image" src="submit.gif" alt="submit button"> 9/11/2018 Lecture 10

Creating a Password Entry Field The password input box works like the text input, but the entered text is hidden by asterisks. password: <input type="password" size="30"> 9/11/2018 Lecture 10

Using the <select> Element The <select> element lets you create a list box or scrollable list of selectable options. <select name="boats"> <option>Canoe</option> <option>Jon Boat</option> <option>Kayak</option> <option>Bass Boat</option> <option>Family Boat</option> </select> 9/11/2018 Lecture 10

9/11/2018 Lecture 10

Using the <textarea> Element The <textarea> element lets you create a larger text area for user input. <p><b>Briefly tell us your favorite fish story:</b><br> <textarea name="fishstory" rows="5" cols="30"> Enter your story here... </textarea> </p> 9/11/2018 Lecture 10

Building Forms within Tables Placing forms within a table can enhance the layout and legibility of the form. 9/11/2018 Lecture 10

Summary You will need to work with some type of server-based software program to process the data from your form, this topic is not included in this course. You have a variety of form elements to choose from when building a form. Use the correct type of form element for the type of data you are gathering. For example, use checkboxes for multiple-choice questions. For a long list of choices, use a select list. 9/11/2018 Lecture 10