Deck 9: Using Javascript With Frames

Full screen (f)
exit full mode
Question
All frames that make up a Web page can communicate with each other by means of JavaScript functions because the Web browser provides a common environment in which frames can interact.____________________
Use Space or
up arrow
down arrow
to flip the card.
Question
Machine language is a system computers can relate to.
Question
For a JavaScript function to access an object in a different file,the two files cannot be linked.
Question
This is a good time to become a programmer because many advances have been made in programming languages.
Question
A parent ____ is a reserved word in JavaScript that refers to the parent frameset.

A) parameter
B) code
C) object
D) behavior
Question
Image objects are the only type of object that can be referenced across frames by JavaScript functions.
Question
Assembly language is very easy to learn.
Question
The frameset file is known as the child document.____________________
Question
Before you can write JavaScript code that allows different frames to interact,you must create ____ documents that define a frameset.

A) JavaScript
B) HTML
C) HTTP
D) Pascal
Question
In the past assembly language was popular,but then an entire group of new languages emerged to make programming easier,including BASIC,FORTRAN ,Pascal,and COBOL.____________________
Question
Any Web page that contains a frameset is always composed of multiple files.
Question
The binary numbers of assembly language were one of the first ways programmers communicated with computers.____________________
Question
When you are working with framesets,there is only one way in which a particular problem can be solved.
Question
A function ____ is simply an object or data element that is accessed by an assigned name within the function.

A) parameter
B) code
C) behavior
D) sequence
Question
In the code below,"____" is the name attribute of the image. < body>
< div align="center">
< img name="UpperImage" src="lions.gif">
< /div>
< /body>

A) center
B) UpperImage
C) lions
D) lions.gif
Question
You can use JavaScript to make sure information displayed in one frame is properly associated with the information in another frame.
Question
The name behavior is required in the file so that the image is accessible to JavaScript by name.____________________
Question
All Web pages consist of just one HTML file.
Question
A frameset is always composed of multiple files.There must be one file that defines the frameset and ____ additional files that define the frames within that frameset.

A) one or more
B) two or more
C) three or more
D) four or more
Question
It is easy for one HTML document to access an object in another document if the two documents are contained within a common frameset.
Question
If you want to change the name of the file to be displayed in the lower frame to lower2.html,the correct code would be ____.

A) < frame name="LowerFrame" src="lower2.html">
B)< frame name="lower2.html" src="LowerFrame">
C)either a.or b.
D)neither a.nor b.
Question
To add an onClick event to an input tag,the correct code would be ____. < ____="button" value="Prev Image"
OnClick="parent.UpperFrame.prevImage()">

A) input code
B) input type
C) input parameter
D) input name
Question
Machine language commands look like ____.

A) 010101
B) 012012
C) 121212
D) 202020
Question
An example of ____ language is: PUSH BP
MOV BP,SP
DEC SP
DEC SP

A) wireless
B) assembly
C) machine
D) integrated
Question
You might find it easier to place many JavaScript function definitions in the top-level frameset file,and then every HTML document can easily access these functions by using the JavaScript ____ object.

A) top
B) top-level
C) bottom
D) bottom-level
Question
In the code below,the table contains ____. < table>
< tr>< td>1: LIONS.GIF< /td>< /tr>
< tr>< td>2: TIGERS.GIF< /td>< /tr>
< tr>< td>3: BEARS.GIF< /td>< /tr>
< tr>< td>4: OHMY.GIF< /td>< /tr>
< /table>

A) four rows
B)four columns
C)both a.and b.
D)neither a.nor b.
Question
Any JavaScript function can be called from any ____.

A) HTML text hyperlink
B) HTML image hyperlink
C) JavaScript event
D) all of the above.
Question
Case 9-1
Sid is creating a Web site featuring a slide show of his trip to Italy and plans to use both an array and a function to start the slide show automatically.
First,Sid defines a four-element image array to contain the four graphics that make up the slide show.The array elements will be numbered ____.

A) 0 to 3
B) 0 to 4
C) 1 to 4
D) 1 to 5
Question
If an HTML document wants to access its parent frameset,it can do so by using the parent object.If that page needs to access the parent frameset of its own parent,it can use two instances of the JavaScript ____ object.

A) parent
B)child
C)either a.or b.
D)neither a.nor b.
Question
To add an onLoad event to the < body> tag of your HTML file,the correct code would be ____.

A) < body onLoad="startup()">
B) < onLoad body="startup()">
C) < onLoad="startup()" body>
D) < body="startup()" onLoad>
Question
Case 9-1
Sid is creating a Web site featuring a slide show of his trip to Italy and plans to use both an array and a function to start the slide show automatically.
To initialize the image array,Sid uses the ____()function.

A) start
B) startup
C) begin
D) initialize
Question
JavaScript is more like other,more highly developed languages such as all of the following EXCEPT ____.

A) C++
B) Visual Basic
C) Java
D) Pascal
Question
____ language followed machine language.

A) Connection
B) Assembly
C) Line
D) Wave
Question
Case 9-2
Sheila has created an online portfolio of her artwork using JavaScript.
Sheila uses ____ attributes within the anchor tags to link to the photos in her slide show.

A) aref
B) href
C) alink
D) hlink
Question
All JavaScript function definitions include a(n)____________________ list,which is a list of data items that the function needs to perform its intended action.
Question
FIGURE 9-2
<strong>FIGURE 9-2   The code shown in Figure 9-2 above is an example of ____ code.</strong> A) JavaScript B) Pascal C) HTML D) C++ <div style=padding-top: 35px>
The code shown in Figure 9-2 above is an example of ____ code.

A) JavaScript
B) Pascal
C) HTML
D) C++
Question
If you have a frameset nested within a second frameset that is nested within a third frameset and so on,you can access any frame you want by developing the proper sequence of ____ objects.

A) JavaScript parent
B) JavaScript child
C) JavaScript key
D) JavaScript parameter
Question
Case 9-2
Sheila has created an online portfolio of her artwork using JavaScript.
Sheila has 45 photos in her portfolio.By using the JavaScript ____ to distinguish one hyperlink from another,Sheila will not have to define 45 different functions.

A) function parameter
B) function method
C) event parameter
D) event method
Question
FIGURE 9-1
<strong>FIGURE 9-1   The code shown in Figure 9-1 above features parent ____.</strong> A) parameters B) objects C) named attributes D) events <div style=padding-top: 35px>
The code shown in Figure 9-1 above features parent ____.

A) parameters
B) objects
C) named attributes
D) events
Question
In the JavaScript function called setImage(index),"index" is the ____.

A) parameter
B) behavior
C) function
D) script
Question
Assembly language uses ____________________ as assembly commands that are then turned into machine-specific commands.
Question
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.event
b.file
c.function
d.tag
e.attribute
< a>< /a>
Question
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.event
b.file
c.function
d.tag
e.attribute
upper1.html
Question
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.event
b.file
c.function
d.tag
e.attribute
name
Question
JavaScript is a valuable tool,but can also be used to write and distribute viruses.Name three features of JavaScript that allow it to be easily used for ill will.
Question
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.event
b.file
c.function
d.tag
e.attribute
setImage()
Question
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.event
b.file
c.function
d.tag
e.attribute
OnClick
Question
The JavaScript keyword ____________________ will always refer to the highest-level frameset.
Question
A JavaScript ____________________ that will take you to the previous image may be named prevImage().
Question
The message()function below invokes the alert()____________________ to display its message.
< script>
function message()
{
alert("We're off to see the wizard!");
return;
}
< /script>
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 9: Using Javascript With Frames
1
All frames that make up a Web page can communicate with each other by means of JavaScript functions because the Web browser provides a common environment in which frames can interact.____________________
True
2
Machine language is a system computers can relate to.
True
3
For a JavaScript function to access an object in a different file,the two files cannot be linked.
False
4
This is a good time to become a programmer because many advances have been made in programming languages.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
A parent ____ is a reserved word in JavaScript that refers to the parent frameset.

A) parameter
B) code
C) object
D) behavior
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
Image objects are the only type of object that can be referenced across frames by JavaScript functions.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
Assembly language is very easy to learn.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
The frameset file is known as the child document.____________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
Before you can write JavaScript code that allows different frames to interact,you must create ____ documents that define a frameset.

A) JavaScript
B) HTML
C) HTTP
D) Pascal
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
In the past assembly language was popular,but then an entire group of new languages emerged to make programming easier,including BASIC,FORTRAN ,Pascal,and COBOL.____________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
Any Web page that contains a frameset is always composed of multiple files.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
The binary numbers of assembly language were one of the first ways programmers communicated with computers.____________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
When you are working with framesets,there is only one way in which a particular problem can be solved.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
A function ____ is simply an object or data element that is accessed by an assigned name within the function.

A) parameter
B) code
C) behavior
D) sequence
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
In the code below,"____" is the name attribute of the image. < body>
< div align="center">
< img name="UpperImage" src="lions.gif">
< /div>
< /body>

A) center
B) UpperImage
C) lions
D) lions.gif
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
You can use JavaScript to make sure information displayed in one frame is properly associated with the information in another frame.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
The name behavior is required in the file so that the image is accessible to JavaScript by name.____________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
All Web pages consist of just one HTML file.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
A frameset is always composed of multiple files.There must be one file that defines the frameset and ____ additional files that define the frames within that frameset.

A) one or more
B) two or more
C) three or more
D) four or more
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
It is easy for one HTML document to access an object in another document if the two documents are contained within a common frameset.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
If you want to change the name of the file to be displayed in the lower frame to lower2.html,the correct code would be ____.

A) < frame name="LowerFrame" src="lower2.html">
B)< frame name="lower2.html" src="LowerFrame">
C)either a.or b.
D)neither a.nor b.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
To add an onClick event to an input tag,the correct code would be ____. < ____="button" value="Prev Image"
OnClick="parent.UpperFrame.prevImage()">

A) input code
B) input type
C) input parameter
D) input name
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
Machine language commands look like ____.

A) 010101
B) 012012
C) 121212
D) 202020
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
An example of ____ language is: PUSH BP
MOV BP,SP
DEC SP
DEC SP

A) wireless
B) assembly
C) machine
D) integrated
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
You might find it easier to place many JavaScript function definitions in the top-level frameset file,and then every HTML document can easily access these functions by using the JavaScript ____ object.

A) top
B) top-level
C) bottom
D) bottom-level
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
In the code below,the table contains ____. < table>
< tr>< td>1: LIONS.GIF< /td>< /tr>
< tr>< td>2: TIGERS.GIF< /td>< /tr>
< tr>< td>3: BEARS.GIF< /td>< /tr>
< tr>< td>4: OHMY.GIF< /td>< /tr>
< /table>

A) four rows
B)four columns
C)both a.and b.
D)neither a.nor b.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
Any JavaScript function can be called from any ____.

A) HTML text hyperlink
B) HTML image hyperlink
C) JavaScript event
D) all of the above.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
Case 9-1
Sid is creating a Web site featuring a slide show of his trip to Italy and plans to use both an array and a function to start the slide show automatically.
First,Sid defines a four-element image array to contain the four graphics that make up the slide show.The array elements will be numbered ____.

A) 0 to 3
B) 0 to 4
C) 1 to 4
D) 1 to 5
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
If an HTML document wants to access its parent frameset,it can do so by using the parent object.If that page needs to access the parent frameset of its own parent,it can use two instances of the JavaScript ____ object.

A) parent
B)child
C)either a.or b.
D)neither a.nor b.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
To add an onLoad event to the < body> tag of your HTML file,the correct code would be ____.

A) < body onLoad="startup()">
B) < onLoad body="startup()">
C) < onLoad="startup()" body>
D) < body="startup()" onLoad>
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
Case 9-1
Sid is creating a Web site featuring a slide show of his trip to Italy and plans to use both an array and a function to start the slide show automatically.
To initialize the image array,Sid uses the ____()function.

A) start
B) startup
C) begin
D) initialize
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
JavaScript is more like other,more highly developed languages such as all of the following EXCEPT ____.

A) C++
B) Visual Basic
C) Java
D) Pascal
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
____ language followed machine language.

A) Connection
B) Assembly
C) Line
D) Wave
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
Case 9-2
Sheila has created an online portfolio of her artwork using JavaScript.
Sheila uses ____ attributes within the anchor tags to link to the photos in her slide show.

A) aref
B) href
C) alink
D) hlink
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
All JavaScript function definitions include a(n)____________________ list,which is a list of data items that the function needs to perform its intended action.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
FIGURE 9-2
<strong>FIGURE 9-2   The code shown in Figure 9-2 above is an example of ____ code.</strong> A) JavaScript B) Pascal C) HTML D) C++
The code shown in Figure 9-2 above is an example of ____ code.

A) JavaScript
B) Pascal
C) HTML
D) C++
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
If you have a frameset nested within a second frameset that is nested within a third frameset and so on,you can access any frame you want by developing the proper sequence of ____ objects.

A) JavaScript parent
B) JavaScript child
C) JavaScript key
D) JavaScript parameter
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
Case 9-2
Sheila has created an online portfolio of her artwork using JavaScript.
Sheila has 45 photos in her portfolio.By using the JavaScript ____ to distinguish one hyperlink from another,Sheila will not have to define 45 different functions.

A) function parameter
B) function method
C) event parameter
D) event method
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
FIGURE 9-1
<strong>FIGURE 9-1   The code shown in Figure 9-1 above features parent ____.</strong> A) parameters B) objects C) named attributes D) events
The code shown in Figure 9-1 above features parent ____.

A) parameters
B) objects
C) named attributes
D) events
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
In the JavaScript function called setImage(index),"index" is the ____.

A) parameter
B) behavior
C) function
D) script
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
Assembly language uses ____________________ as assembly commands that are then turned into machine-specific commands.
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.event
b.file
c.function
d.tag
e.attribute
< a>< /a>
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.event
b.file
c.function
d.tag
e.attribute
upper1.html
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.event
b.file
c.function
d.tag
e.attribute
name
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
JavaScript is a valuable tool,but can also be used to write and distribute viruses.Name three features of JavaScript that allow it to be easily used for ill will.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.event
b.file
c.function
d.tag
e.attribute
setImage()
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.event
b.file
c.function
d.tag
e.attribute
OnClick
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
The JavaScript keyword ____________________ will always refer to the highest-level frameset.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
A JavaScript ____________________ that will take you to the previous image may be named prevImage().
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
The message()function below invokes the alert()____________________ to display its message.
< script>
function message()
{
alert("We're off to see the wizard!");
return;
}
< /script>
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 50 flashcards in this deck.