Copyright Goodheart-Willcox Co., Inc. 548 Unit 3 Living Online Adding JavaScript to a Web Page It is relatively easy to incorporate some basic JavaScript code into a web page. For example, an alert can be added to the AboutMe.html web page created earlier. 1. Applying what you have learned, open the AboutMe.html fi le for editing. 2. Below the h1 end tag, enter the following code. script alert (“My first Web page! Woo Hoo!”) /script 3. Save the fi le, and load it into a web browser to see the alert. 4. Applying what you have learned, edit the script so the alert displays A short biography of your name. 5. Verify the change in the browser. Hands-On Example 13.2.4 PHP and Other Preprocessors A preprocessor language is required to provide database support to a web page. PHP hypertext preprocessor enhances interactions and supplies database support using structured query language (SQL). Early applications of PHP were address books and forum development. This functionality is not handled by the hypertext protocol. An additional program must be running on the server to handle these fi les. The fi lename extension is .php. Because the rendering of the PHP code to HTML is performed at the host, not by the user’s computer, it is called a server-side technology. Preprocessing functions as follows, as shown in Figure 13-25. Notice an additional step is added to the process shown in Figure 13-4 at the beginning of this chapter. 1. The user either enters a location in the navigation bar of a web browser or clicks a link on a web page, which issues the URL for a document to the browser. FYI FYI The original name for PHP was personal home page. World Wide Web 1. User enters URL 7. Browser displays content 6. Document is delivered to computer via HTTP 4. Document is delivered to host via TCP/IP 5. If document is not HTML, it is sent to preprocessor, which generates the HTML page 2. Browser transmits to host server 3. HTTP locates document Goodheart-Willcox Publisher Macrovector/Shutterstock.com Figure 13-25. Preprocessing involves one more step than normal web processing.