For additional information on HTML you should refer to the HTML Guide located in Appendix B. Alternatively, "Teach Yourself Netscape Web Publishing in a Week," also by Sams.net, provides a solid grounding in the many different aspects of Web publishing particular to the Netscape Navigator Web browser.
To get you started, this chapter examines the following topics:
OK, that's the official quote out of the waywhat does it really mean?
The Common Gateway Interface (CGI) is a mechanism that enables Web publishers to programatically control the operation of a Web server and manage exchanges between the server and a Web browser using scripting languages like PERL and Bourne shell scripts. The most common use for CGI is in the handling of data and requests submitted to a Web site with Forms.
A server side language is one that describes programs which run on a Web server, while a client side language is one that describes programs which actually run on a Web browser.
The ability to actually generate the contents and appearance of a Web page on the fly (using a Web browser itself instead of relying on CGI programs and the sometimes limited resources available on a Web server) can lead to considerable performance benefits, as later chapters discuss in detail.
As more and more people begin to flood the World Wide Web, many popular Web sites are rapidly being pushed to the limit of their current processing capabilities. As a result, Web operators are continually looking for ways to reduce the processing requirements for their systemsto ward off the need for expensive computer upgrades.
But what happens if your CGI script discovers that some information is missing? In this case, you need to alert the user that there are problems with the submission and then ask him to edit the details and resubmit the completed form. This entire process is very resource intensive. The Web server needs to allocate a dedicated resource to perform all the validation and checks. When there are errors, two additional data transmissions must be handled by the serverone to alert the user of errors, and one to receive the updated information.
The ACTION attribute of the <FORM> tag has traditionally been associated with a CGI script located on a Web server. But, in fact, any URL can be assigned to the ACTION attribute. Doing so, however, has little value unless the resource associated with the URL can process the contents of the form in some way.
Chapter 7, "Working with Forms," provides additional information about the <FORM> tag.
That having been said, there is one type of URLapart from a CGI scriptthat can process the results of a form in a meaningful waymailto:. For example, if you included the following <FORM> tag on a page, clicking the submit button would e-mail the contents of the form to my e-mail address:
<FORM METHOD="POST" ACTION="mailto:email@example.com">
Using the ACTION="mailto:email_address" option relies on the fact that the Web user has properly configured his or her Web browser to send e-mail. If this has not been done, no e-mail message is transmitted.
Java is a very powerful language which can be used to create any manner of computer or Internet applications, ranging from simple Ticker Tape displays to complex data acquisition systems and even complete Web browsers. Basically, Java lets you incorporate or program new elements into a Web page. When it comes to working with the HTML contents of a Web page itself, the difficulty involved in doing so with Java basically makes the task impossible.
By placing a <SCRIPT> tag in a document, you tell the Web browser to treat any lines of text following the tag as client side scriptprogram code which is to be executed by the Web browserrather than as content for the Web page. This action then continues until a corresponding </SCRIPT> tag is encountered, at which point the Web browser reverts to its usual mode of operation, treating text as Web content.
When used like this, the <SCRIPT> tag takes the following form:
If, on the other hand, you are currently looking for a tool to assist you with your Web publishing needs, then the Netscape Navigator Gold program would be well worth a look. Apart from being a Web browser, Navigator Gold is also a HTML editor. See figure 1.2.
Figure 1.2 Netscape Navigator Gold is both a Web browser and a HTML editor.
By integrating the Web browsing capabilities of Netscape Navigator with an HTML editor, Netscape Communications have created a program which can assist greatly in the streamlining of your Web publishing tasks.
To learn more about Netscape Navigator Gold refer to Appendix A, "Netscape Navigator and Netscape Gold."
Figure 1.3 Netscape Site Manager lets you manage all aspects of your web site.