Download - Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML
Section 17.1• Add an audio file using HTML• Create a form using HTML• Add text boxes using HTML• Add radio buttons and check boxes using HTML• Add a pull-down menu using HTML• Add a text area using HTML
Section 17.2• Identify client-side scripting languages• Create a rollover button using JavaScript• Identify server-side scripting languages• Debug code
17.1 Adding Interactivity Using HTMLGuide to Reading
Main Ideas
You can use HTML code to insert multimedia elements into a Web page. Other HTML tags allow you to create forms.
Key Terms
animated GIF
radio button
pull-down menu
text area
pp. 440-444
17.1 Adding Interactivity Using HTMLAdding Multimedia Elements
Inserting an audio file or an animated GIFanimated GIF file is very similar to inserting an image file. You can set a text link by including text within the anchor tag set.
animated GIF A sequence of GIF images that are all stored in a single file along with an image transition delay value that controls the time each image will stay on the screen. (p. 441)
pp. 440-444
17.1 Adding Interactivity Using HTMLCreating a Registration Form
You create a registration form in HTML with text boxes, using preset options, like radio radio buttonsbuttons, check boxes, pull-down menuspull-down menus, and text areastext areas.
radio button An interactive control that allows a user to select only one option from a list of options; also known as an option button. (p. 442)
pull-down menu See drop-down box. (p. 443)
text area Form element that allows the user to enter as much text as desired; also known as a scroll box. (p. 443)
pp. 440-444
pp. 440-444Adding Interactivity Using HTML
It is not difficult to create a form using HTML. Knowing which HTML tags to use can help you adjust form elements when you create a form in FrontPage.
Creating a Registration Form
17.1
pp. 440-444Adding Interactivity Using HTML
• Activity 17A – Adding an Audio File Using HTML (p. 440)• Activity 17B – Adding Text Boxes Using HTML (p. 441)• Activity 17C – Adding Radio Buttons and Check Boxes
Using HTML (p. 442)• Activity 17D – Adding a Pull-down Menu Using HTML
(p. 443)• Activity 17E – Adding a Text Area using HTML (p. 444)
17.1
17.2 Adding Interactivity Using ScriptingGuide to Reading
Main Ideas
Scripting languages are used to supplement the capabilities of standard HTML. Scripting languages are divided into client-side scripts and server-side scripts.
Key Terms
client-side script
object
event
event handler
function
server-side script
variables
conditional statements
pp. 446-449
17.2 Adding Interactivity Using ScriptingClient-Side Scripts
Some scripting languages, known as client-side scriptsclient-side scripts, are designed to be transferred to the user’s computer along with the HTML code.
client-side script A script that is executed by the user’s Web browser. (p. 446)
pp. 446-449
17.2 Adding Interactivity Using ScriptingClient-Side Scripts
JavaScript is a popular scripting language for client-side scripts. Its code is composed of several elements, including:
• ObjectsObjects• EventsEvents• Event handlersEvent handlers
object In JavaScript, an element in a browser window; it can have properties that define it. (p. 446)
event Anything that causes an effect to occur; often triggered by a user’s action. (p. 447)
event handler The part of the script that responds to an event and defines the action that will occur when the event takes place. (p. 447)
pp. 446-449
17.2 Adding Interactivity Using ScriptingClient-Side Scripts
More Java elements:
• FunctionsFunctions
• VariablesVariables
• Conditional statementsConditional statements
function In JavaScript, code that performs a specific task or action. (p. 447)
variable Used by scripts to identify a value that will change when the script is executed. (p. 447)
conditional statement A type of code that allows a script to respond differently depending on the action taken by the user. (p. 447)
pp. 446-449
17.2 Adding Interactivity Using ScriptingServer-Side Scripts
Server-side scriptsServer-side scripts are run from the Web server. Web designers often use CGI to create Web-based forms that users fill out and then submit to the server.
server-side script A script that is executed on the Web server, with the output transferred to the user’s computer as a Web page. (p. 448)
pp. 446-449
pp. 446-449Adding Interactivity Using Scripting
Server-side scripts can be used to change static content into dynamic content. A server-side script can retrieve data based on the user’s input and then generate a Web page that displays in the user’s browser.
Server-Side Scripts
17.2
pp. 446-449Adding Interactivity Using Scripting
An alert statement tells you when a particular action is not occurring as specified. Alert statements are useful to Web developers during the testing phase. They are not helpful, however, to visitors to the Web site. Therefore, alert statements should be removed before the site is published.
Debugging Code
17.2
pp. 446-449Adding Interactivity Using Scripting
• Activity 17F – Creating a Rollover Button Using JavaScript(p. 447)
17.2
Chapter 17
For more resources on this chapter, go to the Introduction to Web Design Web site at webdesign.glencoe.com.
Resources