Webmaster in a Nutshell, 3rd Edition By Robert Eckstein, Stephen Spainhour

Publisher: O'Reilly Pub Date: December 2002 ISBN: 0-596-00357-9 Table of Pages: 576 • Contents • Index • Reviews Reader • Reviews • Errata

Copyright Preface Contents Conventions Used in This Book Comments and Questions Acknowledgments

Chapter 1. The Web in a Nutshell Section 1.1. Clients and Servers Section 1.2. Uniform Resource Locators (URLs) Section 1.3. Web Content: HTML, XML, CGI, JavaScript, and PHP Section 1.4. The HTTP Protocol Section 1.5. Web Servers Section 1.6. Who Are the Webmasters? Section 1.7. Recommended Books

Part I: HTML Chapter 2. HTML Overview Section 2.1. HTML Document Structure Section 2.2. HTML Syntax Section 2.3. XHTML Section 2.4. Dynamic Content

Chapter 3. HTML Reference Section 3.1. Core Attributes Section 3.2. HTML Tag and Attribute Descriptions

Chapter 4. Frames Section 4.1. Frame Layout Section 4.2. Nested Framesets Section 4.3. The Tag Section 4.4. Frame Targets Section 4.5. Frame Border Attributes

Chapter 5. Tables Section 5.1. The

Tag Section 5.2. The Tag Section 5.4. The
Tag Section 5.3. The
and Tags Section 5.5. Border Color and Backgrounds Section 5.6. Advanced Table Tags

Chapter 6. Forms Section 6.1. The

Tag Section 6.2. The Tag Section 6.3. The

Define a multiline text input area within a ; content of the . The browser uses that text as the default value for the text area.

You can control the dimensions of a multiline text area by defining the cols and rows attributes for the visible rectangular area set aside by the browser for multiline input.

Normally, text typed in the text area by the user is transmitted to the server exactly as typed, with lines broken only where the user pressed the Enter key. With the wrap attribute set to virtual, the text is wrapped within the text area for presentation to the user, but the text is transmitted to the server as if no wrapping had occurred, except where the user pressed the Enter key. With the wrap attribute set to physical, the text is wrapped within the text area and is transmitted to the server as if the user had actually typed it that way. To obtain the default action, set the wrap attribute to off.

Team-Fly Top

Team-Fly

Webmaster in a Nutshell, 3rd Edition By Robert Eckstein, Stephen Spainhour

Table of Contents

Chapter 6. Forms

6.4 The tag gives you two compact alternatives: pull-down menus and scrolling lists.

By placing a list of

The size attribute determines how many options are visible to the user at one time. The value of size should be a positive integer. If size is set to 1 and multiple is not specified, the to be displayed as a scrolling list.

Use the

Use the value attribute to set a value for each option the browser sends to the server if that option is selected by the user. If the value attribute has not been specified, the value of the option is set to the content of the

By default, all options within a multiple-choice tags preselect the first option if no option is explicitly preselected.

Team-Fly Top

Team-Fly

Webmaster in a Nutshell, 3rd Edition By Robert Eckstein, Stephen Spainhour

Table of Contents

Chapter 6. Forms

6.5 An Example Form

Figure 6-1 presents an HTML form showing as many form features as we can fit in the example.

Figure 6-1. The completed form The HTML used to create this form is shown here: Web Banking

Web Banking

Welcome to our Web banking page! No, you can't make deposits or get cash ... but you can get balances, make transfers, and list the most recent transactions on your account.
 Account Number:  PIN: 

Transaction:

Mail me a written verification Do not mail me a written verification

Mail me some information on: Certificates of deposit Home mortgage interest rates Auto loan interest rates

Tell us what you think about our Web services!

First, we use an text field to get the user's bank account number. For the user's Personal Identification Number (PIN), we use an password field so that the numbers don't appear on screen. (In real life, this wouldn't be considered sufficient for protecting someone's PIN, since the data entered is sent unencrypted across the Internet.)

Next, we use a selection box to have the user choose a transaction. The user can choose to get account balances, transfer money, see a listing of the most recent transactions on that account, or stop payment on a check.

We use a radio box to let the user choose whether to get a written verification of this transaction. The default is to send written verification. In a radio box, the user can choose exactly one of the options. Notice that with radio boxes, each item needs to have the same name but different value attributes.

Next, we use a series of checkboxes to find out what additional information a user might want us to send.

For any loose ends, we use a