HTML and CSS Reference
In-Depth Information
<div class="mySubmit">
<input type="submit" value="Get Newsletter" />
</div>
</form>
</div>
This section provided you with two methods to configure forms. Both methods use
advantages of CSS. Which method you choose for a particular Web site depends on the
browsers used by the target audience. Testing the way that different browsers render the
form is crucial.
As you've coded and displayed the forms in this chapter, you may have noticed that
when you click the submit button, the form just redisplays—the form doesn't “do” any-
thing. This is because there is no action property in the <form> tag. The next section
focuses on the second component of using forms on Web pages—server-side processing.
9.5 Server-Side Processing
Your Web browser requests Web pages and their related files from a Web server. The
Web server locates the files and sends them to your Web browser. Then the Web
browser renders the returned files and displays the requested Web pages. Figure 9.25
illustrates the communication between the Web browser and the Web server.
Figure 9.25
The Web browser
(client) works with
the Web server
Sometimes a Web site needs more functionality than static Web pages—possibly a site
search, order form, e-mail list, database display, or other type of interactive, dynamic
processing. This is when server-side processing is needed. Early web servers used a
protocol called Common Gateway Interface (CGI) to provide this functionality. CGI is a
protocol, or standard method, for a Web server to pass a Web page user's request
(which is typically initiated through the use of a form) to an application program and
to accept information to send to the user. The Web server typically passes the form
information to a small application program that is run by the operating system and
processes the data, and it usually sends back a confirmation Web page or message. Perl
and C are popular programming languages for CGI applications.
Server-side scripting is a technology in which a server-side script is embedded within a
Web page document saved with a file extension such as .php (PHP), .asp (Active Server
Pages), .cfm (Adobe ColdFusion), .jsp (Sun JavaServer Pages), or .aspx (ASP.Net).
Server-side scripting differs from CGI in that it uses direct execution—the script is run
either by the Web server itself or by an extension module to the Web server.
 
Search WWH ::




Custom Search