Name:     ID: 
 
    Email: 

HTML Project 9 Pop-up Windows, Scrolling Messages, Validation

True/False
Indicate whether the sentence or statement is true or false.
 

1. 

Including the date that a Web page was last modified gives users confidence that the data on the page is current.
 

2. 

Scrolling messages often are used on Web sites to highlight breaking news, key products, or special promotions.
 

3. 

The display object component of a scrolling message is a text string assigned to a variable.
 

4. 

Large text strings used in scrolling messages may cause older Netscape browsers to crash.
 

5. 

The statement, beginPos = beginPos * 1, increments the beginPos locator by 1.
 

6. 

To open an HTML file stored on a disk in drive A, click File on the menu bar, click Save, click 31/2 Floppy (A:) in the Look in box, and then double-click the desired document to open.
 

7. 

One reason to avoid assigning a scrolling message to the status bar is that the message can hide information the user needs to see relating to the current or next page being loaded.
 

8. 

In HTML code, the variables required in the scrollingMsg() function are not assigned initial values before the function statements are entered.
 

9. 

It is good programming practice to use statements that only can be understood by programmers familiar with the language you are using.
 

10. 

The comparison, a==b, is true if a equals b and the data are of the same type.
 

11. 

After you have saved an HTML file the first time, subsequent Save commands use a different file name with each save.
 

12. 

To avoid errors, it is good development practice to test a Web page several times during its development and a final time before publishing it to your Web site.
 

13. 

The anchor tag defines a target link.
 

14. 

It is not necessary to write JavaScript code to test data for values that are negative or zero.
 

15. 

If the value of decipos is negative one (-1), then decipos is set equal to the length of the string.
 

Multiple Choice
Identify the letter of the choice that best completes the statement or answers the question.
 

16. 

Which of the following is a basic component of a scrolling message?
a.
the message
b.
the position
c.
the delay
d.
all of the above
 

17. 

Which of the following statements increments a variable by one?
a.
variable = variable + 1
b.
variable = variable * 1
c.
variable+++
d.
none of the above
 

18. 

Which of the following conditional operators evaluates as true if a does not equal b?
a.
a{b}
b.
a==b
c.
a>b
d.
a!=b
 

19. 

Which of the following event handlers triggers JavaScript code when used with buttons and links?
a.
onload
b.
onunload
c.
onclick
d.
onsubmit
 

20. 

Which of the following event handlers is used to trigger an action when a document is loaded into the browser window?
a.
onclick
b.
onsubmit
c.
onblur
d.
onload
 

21. 

Which of the following is not a task performed by the scrollingMsg() function?
a.
assigning the next character in the message to the text box
b.
assigning the message and a space to the display object
c.
assigning the user input to a String variable
d.
checking for the end of the message
 

22. 

Which of the following is a variable required by the user-defined scrollingMsg() function?
a.
a spacer
b.
the message
c.
both a. and b.
d.
neither a. nor b.
 

23. 

The first part of the If statement includes ____?
a.
JavaScript statements to execute if condition is True
b.
JavaScript statements to execute if condition is False
c.
the if (condition)
d.
none of the above
 

24. 

When the user performs an action, such as clicking a button, which of the following generally triggers the JavaScript code associated with the action?
a.
an event handler
b.
the <BODY> tag
c.
a conditional operand
d.
the setTimeout() method
 

25. 

Which of the following tags is used with the onload event handler?
a.
<IMG>
b.
<FRAMESET>
c.
<BODY>
d.
all of the above
 

26. 

Which of the following is the general form of the JavaScript statement used to assign a value to a text box object within a form?
a.
document.textboxname.formname.value
b.
textboxname.value = variable_or_literal
c.
document.formname.textboxname.value = variable_or_literal
d.
document.formname.textboxname.value = variable_or_literal = documentname
 

27. 

Within the HTML code, which of the following starts an anchor tag?
a.
<FRAMESET>
b.
<A>
c.
<ANCH>
d.
none of the above
 

28. 

When you set the focus to a text box, the JavaScript statement automatically positions which of the following in the text box?
a.
the insertion point
b.
the END statement
c.
both a. and b.
d.
neither a. nor b.
 

29. 

According to good programming practice, under which of the following should lines of code be indented?
a.
If...Else statements
b.
Loop statements
c.
functions
d.
all of the above
 

30. 

On which of the following is the JavaScript validation procedure completed?
a.
the computer on which the Web page is stored
b.
the user's computer
c.
both a. and b.
d.
neither a. nor b.
 

31. 

Which of the following is a built-in function of JavaScript?
a.
parseInt
b.
parseFloat
c.
eval
d.
all of the above
 

32. 

Which of the following raises 2 to the power of 3?
a.
Math.pow(3, 2)
b.
Math.pow*2 * 3
c.
Math.pow(2, 3)
d.
Pow.math(2, 3)
 

33. 

Which of the following should you double-check after entering in the code?
a.
symbols
b.
parentheses
c.
quotation marks
d.
all of the above
 

34. 

Which of the following is not a step performed by the dollarFormat(function)?
a.
separating the value to the left of the decimal point as the dollar amount
b.
determining the location of the decimal point
c.
performing a calculation that returns a dollar amount
d.
inserting a dollar sign immediately to the left of the first digit without spaces
 

35. 

Which of the following attributes supplied in the open() method allow you to determine the size at which the new window initially displays?
a.
TOP and BOTTOM
b.
WIDTH and HEIGHT
c.
NEW and OLD
d.
EXTEND and CONTRACT
 

Completion
Complete each sentence or statement.
 

36. 

A scrolling message displays either in a text box within the Web page or on the ______________________.
 

 

37. 

When naming a text box for use in a scrolling message, the ______________________ attribute indicates the display width of the text box.
 

 

38. 

The JavaScript statement, ______________________, automatically adds 1 to a variable.
 

 

39. 

To determine if the current value of the beginPos variable is greater than the length of the message, use the ______________________ statement.
 

 

40. 

The submit button object generally is used with the ______________________ event handler.
 

 

41. 

To complete the scrollingMsg() function, you need to add a(n) ______________________ method that pauses before calling the scrollingMsg() function again.
 

 

42. 

<TAG tag attribute eventhandlername = "JavaScript instruction"> is the general form of the statement for a(n) ______________________.
 

 

43. 

Form validation in JavaScript uses the ______________________ statement.
 

 

44. 

Using ______________________ If...Else statements is one method to test multiple conditions.
 

 

45. 

The ______________________ value, returned by the indexOf() method, indicates at what position to concatenate the decimal values.
 

 

46. 

If the value of decipos is zero, then the input value is a(n) ______________________ .
 

 

47. 

The ______________________ loop relies on a conditional statement using numeric values.
 

 

48. 

When the TITLEBAR attribute of the open() method is set to ______________________, the title bar is removed.
 

 

49. 

The toolbar attribute of the open() method is written as, ______________________.
 

 

50. 

The ______________________ attribute of the open(method) includes a status bar when set to the value of yes.
 

 



 
Submit          Reset Help