Deck 8: Creating Forms With Javascript
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
Play
Full screen (f)
Deck 8: Creating Forms With Javascript
1
A stereo button is an input control that allows the user to select any number of options from a set of options.
False
2
Returning a value means that whenever any other function calls this function,its name is essentially replaced by the value it returns.
True
3
When the server receives the form data,it is processed by another program that is typically written in ASP,JSP,PHP,or some other ____ scripting/programming language.
A) client-side
B) server-side
C) form-specific
D) browser-specific
A) client-side
B) server-side
C) form-specific
D) browser-specific
B
4
JavaScript statements can use a single equal sign ( = )or two equal signs ( == ).
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
In addition to using the Backspace or Delete key to correct mistakes,it is customary for Web page designers to include some type of clear ____ that allows the user to erase all form entries with a single click and start over.
A) wizard
B) button
C) menu
D) shortcut
A) wizard
B) button
C) menu
D) shortcut
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
For many years,the C and C++ languages have been criticized because they allow the programmer to easily confuse the assignment operator with the comparison operator.____________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
Server-side script looks a lot like JavaScript code,but it is processed in a very different fashion.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
JavaScript is capable of sending information to another location.This data transfer normally travels through a(n)HTML connection,eventually arriving at a Web server somewhere.____________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
If the user forgets to fill out a portion of a form,it is an easy task for JavaScript to detect the absence of required data and alert the user accordingly.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
Server-script programs are capable of many different functions,but they are most frequently used to update a transaction system.____________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
Practically every business that provides its customers with electronic forms that collect data has the need to ____ the data to ensure that customers have entered appropriate and complete information.
A) scan
B) validate
C) correct
D) process
A) scan
B) validate
C) correct
D) process
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
There are several JavaScript events that can be used to add some "intelligence" to simple HTML form components.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
The NOT operator is most commonly used when the programmer wants to test for a true condition.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
Returning a value means that whenever any other function calls this function (such as the doSubmit()function),its name is essentially replaced by the value it returns.____________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
To create an effective order form,you must first define its appearance on the Web page by using the appropriate JavaScript tags.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
To validate the contents of a text field,the program checks the contents of the object's name property to see if it contains an empty string.____________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
You name each of the interactive objects in an HTML form (also called ____)so that they can be referenced within JavaScript code.
A) components
B) pieces
C) parcels
D) packets
A) components
B) pieces
C) parcels
D) packets
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
A meaningless sequence of gibberish or cryptic symbols can be a string,and there is virtually no limit to the length of a string.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
Like C,C++,and Java,JavaScript gives you the ability to invert the value of a logical variable with the NO operator (&).
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
A ____ button is an input control that allows the user to select just one option from a set of options.
A) television
B) choice
C) radio
D) choose
A) television
B) choice
C) radio
D) choose
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
____________________ is the process of checking user input data to make sure that it is complete and accurate.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
You begin the process of creating a fully functional,robust form by ____.
A) identifying the various objects in the HTML form with which the users interact
B) defining the general layout of the form on a Web page
C) writing the JavaScript functions that are invoked when the user triggers a specific JavaScript event
D) giving each of these interactive objects a name
A) identifying the various objects in the HTML form with which the users interact
B) defining the general layout of the form on a Web page
C) writing the JavaScript functions that are invoked when the user triggers a specific JavaScript event
D) giving each of these interactive objects a name
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
In the case of C,C++,Java,and JavaScript,the assignment operation is accomplished with the ____ character(s).
A) "="
B) "= ="
C) "+"
D) "+ +"
A) "="
B) "= ="
C) "+"
D) "+ +"
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
Old-style stereo systems used mechanical radio buttons that were usually ____,so the Windows programmers gave this shape to their radio buttons.
A) square
B) round
C) oval
D) rectangle
A) square
B) round
C) oval
D) rectangle
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
Case 8-1
Carmella is putting together an order processing system for her local pizza parlor, Pete's Italian Pies.
In the JavaScript below,Carmella realizes that the doSubmit()function does nothing more than invoke the JavaScript ____ method.
< script>
Function doSubmit()
{
Alert("Your pizza order has been submitted.");
Return;
}
< /script>
A) script()
B) alert()
C) submit()
D) function()
Carmella is putting together an order processing system for her local pizza parlor, Pete's Italian Pies.
In the JavaScript below,Carmella realizes that the doSubmit()function does nothing more than invoke the JavaScript ____ method.
< script>
Function doSubmit()
{
Alert("Your pizza order has been submitted.");
Return;
}
< /script>
A) script()
B) alert()
C) submit()
D) function()
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
A string can consist of ____.
A) a single word
B) a complete sentence
C) an entire chapter of a book
D) all of the above
A) a single word
B) a complete sentence
C) an entire chapter of a book
D) all of the above
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
In the case of C,C++,Java,and JavaScript,the comparison operation is accomplished with the < sup> < /sup>____ character(s).
A) "="
B) "= ="
C) "+"
D) "+ +"
A) "="
B) "= ="
C) "+"
D) "+ +"
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
FIGURE 8-2

Referring to Figure 8-2 above,which of the following statements is NOT true ____.
A) The section contains a heading
B) The section contains three radio buttons
C) The radio buttons have different labels
D) The radio buttons have different names

Referring to Figure 8-2 above,which of the following statements is NOT true ____.
A) The section contains a heading
B) The section contains three radio buttons
C) The radio buttons have different labels
D) The radio buttons have different names
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
The ____ attribute of input controls can be "text," "radio," or "checkbox."
A) value
B) text
C) string
D) type
A) value
B) text
C) string
D) type
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
Case 8-2
David is adding a clear form feature to the Pete's Italian Pies Web site, and has written the following code:
function doClear() {
document.PizzaForm.customer.value = "";
}
Referring to David's JavaScript above,the text control is assigned the name ____,and it is an element within the form object that you named PizzaForm.
A) document
B) Pizza
C) value
D) customer
David is adding a clear form feature to the Pete's Italian Pies Web site, and has written the following code:
function doClear() {
document.PizzaForm.customer.value = "";
}
Referring to David's JavaScript above,the text control is assigned the name ____,and it is an element within the form object that you named PizzaForm.
A) document
B) Pizza
C) value
D) customer
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
Case 8-1
Carmella is putting together an order processing system for her local pizza parlor, Pete's Italian Pies.
In testing the JavaScript below,Carmella discovers that the onClick event looks and acts like the ____ events she used in another project.
< input type="button" value="Submit Order" onClick="doSubmit()">
A) onMouseOver
B) onMouseOut
C) onLoad
D) all of the above
Carmella is putting together an order processing system for her local pizza parlor, Pete's Italian Pies.
In testing the JavaScript below,Carmella discovers that the onClick event looks and acts like the ____ events she used in another project.
< input type="button" value="Submit Order" onClick="doSubmit()">
A) onMouseOver
B) onMouseOut
C) onLoad
D) all of the above
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
A completed form consists of headings,labels,and user ____ controls.
A) output
B) input
C) message
D) alert
A) output
B) input
C) message
D) alert
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
You can invert a true value to false or a false value to true by placing a single ____ in front of the variable.
A) !
B) $
C) %
D) +
A) !
B) $
C) %
D) +
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
Case 8-2
David is adding a clear form feature to the Pete's Italian Pies Web site, and has written the following code:
function doClear() {
document.PizzaForm.customer.value = "";
}
Referring to David's JavaScript above,the form object is contained with the ____ object.
A) document
B) Pizza
C) value
D) customer
David is adding a clear form feature to the Pete's Italian Pies Web site, and has written the following code:
function doClear() {
document.PizzaForm.customer.value = "";
}
Referring to David's JavaScript above,the form object is contained with the ____ object.
A) document
B) Pizza
C) value
D) customer
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
Whenever a variable (or ____ return value)is being compared to the false value (== false),the comparison can be shortened by using the ! operator instead.
A) function
B) form
C) property
D) operator
A) function
B) form
C) property
D) operator
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
A JavaScript function can be invoked (or ____)when the user clicks the Submit Order button.
A) called
B) signaled
C) invited
D) stored
A) called
B) signaled
C) invited
D) stored
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
To get the Submit Order button to call a JavaScript function when it is clicked,you need to make use of a JavaScript ____.
A) event
B) method
C) parameter
D) property
A) event
B) method
C) parameter
D) property
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
FIGURE 8-1

Referring to Figure 8-1 above,the following field is NOT left-aligned using a non-breaking space ____.
A) Name
B) State
C) Phone
D) City

Referring to Figure 8-1 above,the following field is NOT left-aligned using a non-breaking space ____.
A) Name
B) State
C) Phone
D) City
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
With ____ you will receive a compilation error if you attempt to use the wrong operator.
A) C and C++
B) JavaScript
C) Java
D) all of the above
A) C and C++
B) JavaScript
C) Java
D) all of the above
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
The validateText()function can only return one of two possible values: ____.
A) false or true
B) no or yes
C) null or void
D) fail or pass
A) false or true
B) no or yes
C) null or void
D) fail or pass
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Interactive objects in an HTML form
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Interactive objects in an HTML form
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Sequence of one or more characters
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Sequence of one or more characters
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
To validate a set of radio buttons,you need to test the value of each object's ____________________ property to see if it is set to true or false.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Input control that allows the user to select just one option from a set of options
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Input control that allows the user to select just one option from a set of options
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
The JavaScript event called ____________________ is triggered whenever an input control of type button is clicked.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
It is essential for programmers to give the user some kind of visual or auditory clue as to what the program is doing or when it has completed its operation.Name five different ways that you can be notified by a program of its status.Imagine that you were selling circus tickets online.What are two ways you could notify users of the purchase process status?
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Input control that allows the user to enter a string value into a specific location on the Web page
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Input control that allows the user to enter a string value into a specific location on the Web page
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
The term radio button has been around the software industry ever since Microsoft introduced its ____________________ operating system in the late 1980s.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
The validateText()function returns a(n)____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Input control that allows the user to select any number of options from a set of options
Identify the letter of the choice that best matches the phrase or definition.
a.Check box
b.String
c.Controls
d.Radio button
e.Text field
Input control that allows the user to select any number of options from a set of options
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck