190-513 1-2 lotus
TRANSCRIPT
-
8/10/2019 190-513 1-2 Lotus
1/63
Lotus 190-513
Using JavaScript in Domino Applications
Version 1.2
-
8/10/2019 190-513 1-2 Lotus
2/63
-
8/10/2019 190-513 1-2 Lotus
3/63
QUESTION NO: 1
The following JavaScript code segment was created:
var cMovies = frm.MovieLand;
var nMovies = cMovies.length+1;
cMovies.length = nMovies;
var newIndex = nMovies -1;
cMovies.options[newIndex].text = this.value;
this.value = "";
Which one of the following is NOT true about this code segment?
A. The length of an object is one more than the index.
B. A new value is permanently added to a select object.
C. The index value begins with 0.
D. It allows a person to add a value to a select object.
Answer: B
QUESTION NO: 2
Mary needs to close the frameset in the Web browser and open the Video Review form in a frameless
window. The button where she will enter the code is located in the second frame of the frameset. Which
one of the following code segments does she enter in the onClick event of the button to accomplish
this?
-
8/10/2019 190-513 1-2 Lotus
4/63
A. window.opener.location="Review?OpenForm"
B. window.top.location="Review?OpenForm"
C. window.self.location="Review?OpenForm"
D. window.location="Review?OpenForm"
Answer: B
QUESTION NO: 3
The following JavaScript code segment was written as part of a procedure to retrieve multiple values
from a select object:
var cMovies = frm.MovieLand;
for(i=0; i
-
8/10/2019 190-513 1-2 Lotus
5/63
C. this.value=this.value + cMovies.options[i].text;
D. this.text=this.text + cMovies.options[i].text;
Answer: B
QUESTION NO: 4
The following statements appear in a function Pat is writing to calculate how many weeks before a video
is released.
if (numDays 7) && (numDays 14) && (numDays 21) && (numDays
-
8/10/2019 190-513 1-2 Lotus
6/63
When Pat tests the button that calls the function, which one of the following will occur?
A. If numDays = 7, the first condition will be true, varMsg will equal "The video will be released this
week", and the alert statement will execute.
B. If numDays = 21, the third condition will be true, varMsg will equal "The video will be released in 3
weeks", and then the following conditions will be tested before the alert statement is executed.
C. If numDays = 7, the first condition will be true, varMsg will equal "The video will be released this
week", and then the following conditions will be tested before the alert statement is executed.
D. If numDays = 14, the third condition will be true, varMsg will equal "The video will be released in 3
weeks", and then the following conditions will be tested before the alert statement is executed.
Answer: A
QUESTION NO: 5
Edith wants to change a graphic whenever the user passes the cursor over the graphic in a Web
browser. Which one of the following describes how she can do this?
A. She should write the location (URL) of the new image to the src property of the image in the onSelect
event and set it back to the original image in the onMouseUp event.
B. She should write the location (URL) of the new image to the value property of the image in the
onMouseOver event and set it back to the original image in the onMouseUp event.
C. She should write the location (URL) of the new image to the src property of the image in the
onMouseOver event and set it back to the original image in the onMouseOut event.
D. She cannot do this; images cannot be changed.
Answer: C
-
8/10/2019 190-513 1-2 Lotus
7/63
QUESTION NO: 6
Ann created the following code segment:
function checksubject()
{
if(window.document.forms[0].Subject.value=="")
{
alert("Please enter a subject.");
window.document.forms[0].Subject.focus()
}
else
{
window.document.forms[0].submit()
}
Which one of the following could Ann place between the function name and the if statement to prevent
the need to type window.document.forms[0] each time it is needed?
A. function checksubject()
{
(this)
{
if(Subject.value="")
B. function checksubject()
{
with(window.document.forms[0])
-
8/10/2019 190-513 1-2 Lotus
8/63
{
if(Subject.value=="")
C. function checksubject()
{
(window.document.forms[0])
{
if(Subject.value=="")
D. function checksubject()
{
with(this)
{
if(Subject.value="")
Answer: B
QUESTION NO: 7
Dan is writing a JavaScript to display a message about the movie of the week. Which one of the
following strings would NOT be properly interpreted by JavaScript in an alert dialog box?
A. alert("The movie of the week is my brother\'s favorite.")
B. alert("My brother said, 'I like this movie.'")
C. alert('This is my brother's favorite movie of the week.')
D. alert("This week\'s movie is my brother\'s favorite")
Answer: C
-
8/10/2019 190-513 1-2 Lotus
9/63
-
8/10/2019 190-513 1-2 Lotus
10/63
D. In the HTML Head Content section of the Form object
Answer: C
QUESTION NO: 10
Which one of the following describes how variables are declared and typed in JavaScript?
A. explicit initialization
loosely typed
B. explicit declaration
strongly typed
C. implicit declaration
loosely typed
D. implicit declaration
strongly typed
Answer: C
QUESTION NO: 11 CORRECT TEXT
Alma wants to have a second window open in a Web browser to simulate the @dialogbox function andallow the user to enter information about a returned video. So far, she has written the following code:
winurl="/videos/video.nsf/returned OpenForm";
winname="Helplet";
-
8/10/2019 190-513 1-2 Lotus
11/63
winOpts =
"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=400,
height=200";
Which one of the following will open a second window?
A. window.opener(winurl);
B. dialogbox(winurl);
C. tmpWindow=window.open( winurl, winname, winOpts );
D. prompt(winurl);
Answer: Pending,
Send us your answers [email protected]
QUESTION NO: 12
Donna is using the history object to create a dynamic back button on a Video form. The history object is
under which one of the following objects?
A. Past
B. Location
C. Window
D. Document
Answer: C
mailto:[email protected]:[email protected]:[email protected]:[email protected] -
8/10/2019 190-513 1-2 Lotus
12/63
QUESTION NO: 13
Jeff is creating a script that will change the background color of a form based on the value of a field
called inStock. The code for the function is:
function changeColor()
{
var theBox = document.forms[0].inStock.value;
if (theBox == "in")
{
alert("The movie is in stock!");
document.bgColor='blue';
}
else if (theBox == "out")
{
alert("The movie is currently out.");
document.bgColor='red';
}
Which one of the following is true when the function is invoked and the movie is in?
A. None of the above.
B. The alert box displays, "The movie is in stock!" and the function exits.
C. The alert box displays, "The movie is in stock!" and the background color of the form is changed to
blue.
D. The alert box displays, "The movie is in stock!" and the background color of the document is changed
to blue.
-
8/10/2019 190-513 1-2 Lotus
13/63
Answer: D
QUESTION NO: 14
Alma wants to have a second window open in a Web browser to simulate the @dialogbox function and
allow the user to enter information about a returned video. So far, she has written the following code:
winurl="/videos/video.nsf/returned?OpenForm";
winname="Helplet";
winOpts =
"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=400,
height=200";
Which one of the following will open a second window?
A. window.opener(winurl);
B. dialogbox(winurl);
C. DtmpWindow=window.open( winurl, winname, winOpts );
D. prompt(winurl);
Answer: C
QUESTION NO: 15
The following JavaScript code was placed in the onChange event for a listbox:
-
8/10/2019 190-513 1-2 Lotus
14/63
var frm=document.forms[0];
var sc = frm.SelectedVacation;
var vacation = this;
sc.value="";
{
if(vacation.options[i].selected)
{
sc.value = sc.value + vacation.options[i].text = "\n";
}
}
Which one of the following is the missing line of code?
A. for (i = 0, i < vacation.length, i++)
B. until (i=0, i> vacation.length, i--)
C. while (i !=0; index < vacation.length; i--)
D. for (i = 0; index < vacation.length; i++)
Answer: A
QUESTION NO: 16
-
8/10/2019 190-513 1-2 Lotus
15/63
Greg wants to validate that at least one box was checked in a checkbox field called "category" before
allowing the user to submit a returned video form. Which one of the following approaches should he
use to determine this?
A. Use the value property for the category input element.
B. Loop through all the elements of the category object using category[i]. For each element, examine the
checked property to see if it is true.
C. document.forms[0].category.checked will be true if at least one selection was made.
D. Use the defaultChecked property of the category input element to find out which checkboxes were
checked by the user.
Answer: B
QUESTION NO: 17
Look at the following code for the onClick event of a button:
function printvar()
{
var1 = 20;
alert('the value of var1 is ' + var1);
};
var var1 = 10;
printvar();
Which one of the following will be the value of var1 in the alert message:?
-
8/10/2019 190-513 1-2 Lotus
16/63
A. 10
B. "10"
C. undefined
D. 20
Answer: D
QUESTION NO: 18
Look at the following JavaScript code segment:
document.forms[0].myField.value="Hello World!";
Which one of the following will this code do?
A. It will create a field on the form called myField and assign it the value, "Hello World!"
B. It will assign the string "Hello World!" to the field called myField.
C. It will create a variable called myField with the value, "Hello World!"
D. It will check to see if the value in the field called myField equals the string "Hello World!"
Answer: B
QUESTION NO: 19
The following JavaScript code segment was placed in a Submit button:
-
8/10/2019 190-513 1-2 Lotus
17/63
var frm=document.forms[0];
if(validation(frm.Street) &&
validation(frm.Phone) &&
validation(frm.Fax))
{
frm.submit();
}
In which one of the following button events should it have been placed?
A. onKeyDown
B. onClick
C. onFocus
D. onBlur
Answer: B
QUESTION NO: 20
Which one of the following events in JavaScript is most similar to the LotusScript Entering event?
A. onFocus
B. onLoad
C. onBlur
-
8/10/2019 190-513 1-2 Lotus
18/63
D. onEnter
Answer: A
QUESTION NO: 21
Karl is creating a JavaScript program in the JS Header of a form to input new video releases. Which one
of the following comment delimiters would NOT be allowed?
A. /* and */
B. //
C.
D. All of the above are allowed.
Answer: C
QUESTION NO: 22
Ann has written the following code in the Submit button onClick event:
if(window.document.forms[0].Email.value="")
{
alert("Please enter an email we can use to reply to your question.");
window.document.forms[0].Email.focus()
}
else
-
8/10/2019 190-513 1-2 Lotus
19/63
{
window.document.forms[0].submit()
}
When she runs it, the else statement is never executed. Which one of the following code changes will
correct the error?
A. if(Email.value="")
B. The code is correct. It needs to be moved to the onBlur event of the Email field.
C. if(window.document.forms[0].email.value="")
D. if(window.document.forms[0].Email.value=="")
Answer: D
QUESTION NO: 23
The following JavaScript function was created to check whether required data had been entered into a
field:
var validate = validate(frm.Firstname);
function validate(fld)
{
if(frm.Firstname =="")
.... JavaScript statements ....
return "value";
-
8/10/2019 190-513 1-2 Lotus
20/63
}
Assuming that the code executes correctly, which one of the following describes what was placed on
?
A. [
B. /*
C. {
D. (
Answer: C
QUESTION NO: 24
The following code will produce a run-time error:
Line 1 {
Line 2 path=location.pathname.toLowerCase( );
Line 3 nsfPos=path.indexOf(".nsf");
Line 4 path=path.substring(0, nsfpos+5);
Line 5 }
Which one of the following lines is incorrect?
A. 2
-
8/10/2019 190-513 1-2 Lotus
21/63
B. 3
C. 4
D. 1
Answer: C
QUESTION NO: 25
Karen is writing a JavaScript to display information about a movie when the user clicks a button. Which
one of the following characters will be ignored in Karen's script?
A. Single quotation marks
B. Tab characters
C. Parentheses
D. Colons
Answer: B
QUESTION NO: 26
Look at the following application specification. An application's data is entered via either a Web or Notes
client. Both clients must have similar functionality. There is a form which displays/allows for data entry
of the video. Its name is "Product Description," with the alias "PD." The form also has a facility to makethe video available once inventory is checked. When placed in the browser, which one of the following is
the NAME attribute of the tag for the Product Description form?
A. "_DominoForm"
-
8/10/2019 190-513 1-2 Lotus
22/63
B. "PD"
C. "_PD"
D. "Product Description"
Answer: C
QUESTION NO: 27
Ann needs to change the contents of the third frame in a three-frame frameset. She plans to use the
onClick event of an HTML link in the first frame. She needs to display the home URL:
techsupport.videosource.com.
Which one of the following code segments will do this?
A. A href='' onClick="window.opener.frames[2].location='http://techsupport.videosource.com'">A
Help
B. A href='' onClick="window.parent.frames[3].location='http://techsupport.videosource.com'">A
Help
C. A href='' onClick="window.self.frames[3].location='http://techsupport.videosource.com'">A Help
D. A
Help
Answer: D
QUESTION NO: 28
Harvey has three numeric, editable fields on his form: unitprice, quantity, and total. He wants to have a
button to compute the total. So far he has written:
-
8/10/2019 190-513 1-2 Lotus
23/63
theForm = document.forms[0];
theForm.total.value = theForm.quantity.value + theForm.unitprice.value;
Which one of the following will happen when the user enters 10 in the unitprice field and 30 in the
quantity field and the button is pressed?
A. 300 will be placed in the total field.
B. 3010 will be placed in the total field.
C. A JavaScript error will occur.
D. The Domino Designer will not let Harvey save the form since the above code has an error.
Answer: B
QUESTION NO: 29
John extracted a 8-letter word using the following @Function:
@Left(Field; 6; 7)
Which one of the following will allow this to be done using JavaScript?
A. Field.indexOf(6,7)
B. Field.substr(6,7)
C. Field.search(6,7)
D. Field.split(6,7)
-
8/10/2019 190-513 1-2 Lotus
24/63
Answer: B
QUESTION NO: 30
Danielle has written the following function, which appears in the JS Header of the ShipTo form.
function getkeyval()
{
}
It opens when the client clicks on the Alternate Ship To address in the Video Order form. The ShipTo
form appears in a smaller window allowing the user to select a different ShipTo address for the current
order.
Which one of the following best describes how to trigger the function in the ShipTo form and then close
the open window?
A. Choose Create>Hotspot>Link Hotspot. Select the HTML tab, and enter the following in the Class field:
onClick="getkeyval()"
B. Create a close link on the form using passthru HTML as follows:
CloseC. In the OnChange event of the ShipToAddress field, enter "getkeyval()".
D. Choose Create>Hotspot>Link Hotspot. Select the HTML tab, and enter the following in the Other field:
onClick="getkeyval()"
Answer: B
-
8/10/2019 190-513 1-2 Lotus
25/63
QUESTION NO: 31
Jamie wants to define variables to be used in a field on a form for either Notes clients or Web clients. In
which one of the following events should Jamie enter JavaScript code?
A. PostOpen
B. onExit
C. QueryOpen
D. onLoad
Answer: D
QUESTION NO: 32
Consider the following:
function readSelect( )
{
selectField=document.forms[0].selectType;
sLen=selectField.options.length;
for(i=0;i
-
8/10/2019 190-513 1-2 Lotus
26/63
-
8/10/2019 190-513 1-2 Lotus
27/63
-
8/10/2019 190-513 1-2 Lotus
28/63
B. var x = Document.forms[0].myField;
alert(x);
C. var x = document.forms[0].myField.value;
alert(x);
D. var x = Document.forms[0].myField.value;
alert( var x);
Answer: C
QUESTION NO: 36
In which one of the following events should Jim enter JavaScript code to validate a field in use for both
Notes clients and Web clients?
A. onFocus
B. onBlur
C. Exiting
D. Input Validation
Answer: B
QUESTION NO: 37
Jim is writing JavaScript code to validate a field when the user moves out of it. In which one of the
following events should it be placed to work on a Web client?
-
8/10/2019 190-513 1-2 Lotus
29/63
A. Input Validation
B. onBlur
C. Exiting
D. onFocus
Answer: B
QUESTION NO: 38
The following JavaScript code segment was placed in an application:
var cMovies = frm.MovieLand;
cMovies.options[cMovies.selectedIndex].value;
To which one of the following item properties does this code refer?
A. Alias of selected entry in keyword list
B. Location of selection in form
C. Selected entry in keyword list
D. All entries in keyword list
Answer: A
QUESTION NO: 39
-
8/10/2019 190-513 1-2 Lotus
30/63
-
8/10/2019 190-513 1-2 Lotus
31/63
-
8/10/2019 190-513 1-2 Lotus
32/63
else if((numDays > 14) && (numDays 21) && (numDays
-
8/10/2019 190-513 1-2 Lotus
33/63
Which one of the following select object properties returns a Boolean which indicates the items selected
in a list?
A. options[i].index
B. options[i].selected
C. selectedIndex
D. name
Answer: B
QUESTION NO: 44
Look at the following JavaScript code:
var textvalue = "This video stars Steve M....";
Which one of the following code lines will return the index of the first occurrence of the substring
"Steve"?
A. indexOf ("Steve");
B. textvalue.indexOf ("Steve");
C. textvalue.substring ("Steve");
D. textvalue.mid("Steve");
Answer: B
QUESTION NO: 45
-
8/10/2019 190-513 1-2 Lotus
34/63
Jon wants to use JavaScript to validate the Last_Name field on his form when the user tabs out of the
field in the Notes client and the Web browser client. He has written the following code in the JS Header
event of the form:
function checkfield(x)
{
if (x.value=="" )
{
alert("Error--missing information for "+ x.name);
x.focus();
}
When he tabs out of the field, nothing happens. Which one of the following must he enter in the onBlur
event of the Last_Name field to correct the problem?
A. checkfield(Last_Name)
B. checkfield(this)
C. checkfield(Last_Name.value)
D. checkfield(Last_Name.text)
Answer: B
QUESTION NO: 46
Inga wants to determine in her JavaScript if the user is using the Notes client or a Web browser. Which
one of the following JavaScript properties will tell her that information?
-
8/10/2019 190-513 1-2 Lotus
35/63
A. window.version;
B. navigator.clientType;
C. navigator.appName;
D. You cannot determine this using JavaScript.
Answer: C
QUESTION NO: 47
Which one of the following would Jim do to set up a global variable that will hold the initial value of a
field on the page?
A. Declare the variable in the JS Header event of the form and set the value in the onClick event of the
field.
B. Declare and set the variable in the JS Header event of the form.
C. Declare the variable in the JS Header event of the form and set the variable in the onLoad event of the
form.
D. Declare and set the variable in the onClick event of the field.
Answer: C
QUESTION NO: 48
Consider the following:
-
8/10/2019 190-513 1-2 Lotus
36/63
Which one of the following does the JavaScript event handler do?
A. It submits the current HTML form.
B. It submits the current HTML page.
C. It calls a JavaScript function called submitMe( ) and passes the form object for the current page.
D. It calls a JavaScript function called submitMe( ) and passes the form object for the button object to
the function.
Answer: D
QUESTION NO: 49
Jane declared the following JavaScript variables:
var frm;
var fname;
var lname;
var dname;
var ename;
In which one of the following were these declarations made to make their scope global?
A. HTML Head Content
B. Initialize
C. {Globals}, {Declarations}
-
8/10/2019 190-513 1-2 Lotus
37/63
D. JS Header
Answer: D
QUESTION NO: 50
Sally declared and initialized several variables in the JS Header. These variables referred to objects on
the form. Which one of the following describes what happened when the code was tested?
A. Initialization failed, since the JS Header is interpreted before the HTML which creates the rest of the
objects.
B. Initialization was successful, but the variables were available only to objects also declared in the JS
Header.
C. Initialization failed, since all JavaScript variables in Notes/Domino must be initialized within the
object.
D. Initialization was successful and the variables were available throughout the document.
Answer:
QUESTION NO: 51
The following declarations were made in the JS Header event:
var frm=document.forms[0];
Street = frm.Street;
State = frm.State;
Country = frm.Country;
-
8/10/2019 190-513 1-2 Lotus
38/63
PostalCode = frm.PostalCode;
Address = frm.Address;
Which one of the following lines of code, when placed in the onFocus event for the Address field, will
combine the contents of the Street, State, Country, and PostalCode fields?
A. Address.value=Street+" "+State+","+Country+" "+PostalCode
B. this.value=Street.value+" "+State.value+","+Country.value+" "+PostalCode.value
C. this=Street+" "+State+","+Country+" "+PostalCode
D. Address+" "+Street+" "+State+","+Country+" "+PostalCode
Answer: B
QUESTION NO: 52
Look at the following JavaScript function:
function clickButton
{
document.forms[0].submitMe.onClick( )
}
Which one of the following will this function do?
A. Run the onClick event of an object named submitMe.
B. Place the cursor in an input on the form named submitMe.
-
8/10/2019 190-513 1-2 Lotus
39/63
C. Run a global JavaScript function named onClick( ).
D. Run a JavaScript function named onClick( ) that is on a form object named submitMe.
Answer: A
QUESTION NO: 53
Bahar is creating a form that will open a new window with a location object. Which one of the following
describes the location object?
A. It is an object under the document object.
B. It contains the URL of a hypertext link.
C. It contains the URL of the current document.
D. It is an object under the history object.
Answer: C
QUESTION NO: 54
Raphael is creating a text field on a Notes form that will be used to enter product descriptions in the
Video form. The text field object is directly under which one of the following in the document object
model?
A. Document object
B. Form object
C. Video object
D. Text object
-
8/10/2019 190-513 1-2 Lotus
40/63
Answer: B
QUESTION NO: 55
Inga wants to determine in her JavaScript if the user is using the Notes client or a Web browser. Which
one of the following JavaScript properties will tell her that information?
A. navigator.clientType;
B. window.version;
C. navigator.appName;
D. You cannot determine this using JavaScript.
Answer: C
QUESTION NO: 56
Jose opens a form called "returnedvideo" in a second window in a Web browser. This form gathers
information about returned videos, and when the user clicks a button, it transfers the part number of
the video from the partnoinput field to the first window. Which one of the following button code lines in
the second window ("returnedvideo") will transfer the value of the Part Number field "partnoinput" to
the "partno" field in the first window?
A. window.close();
B. opener.document.forms[0].partno.value=document.forms[0].partnoinput.value;
C. window.open('returnedvideo');
D. partno.value = partnoinput.value;
-
8/10/2019 190-513 1-2 Lotus
41/63
-
8/10/2019 190-513 1-2 Lotus
42/63
C. It initializes the variable form to 0.
D. It declares a global variable.
Answer: B
QUESTION NO: 59
Which one of the following HTML tags is used to identify JavaScript?
A.
....
B.
...
C.
...
D.
...
Answer: D
-
8/10/2019 190-513 1-2 Lotus
43/63
QUESTION NO: 60
The following incomplete code segment was placed in the JS Header section of a form object:
function validate(field)
{
if(validateRunning)
{
validateRunning=false;
return;
}
}
Once the function has been completed and tested, which one of the following will be its scope when
running on a browser?
A. Global to the entire form
B. Local to the entire form
C. Local to the calling object only
D. Global to the entire document
Answer: D
QUESTION NO: 61
Look at the following button code:
var x = 42;
-
8/10/2019 190-513 1-2 Lotus
44/63
x = "this is a string";
alert ("The value of x is " + x);
Which one of the following will happen when this code is run?
A. A "Type Mismatch" error will occur when the button is clicked.
B. An alert will appear with the message "The value of x is this is a string".
C. A run-time JavaScript error will occur when the button is clicked.
D. The Domino Designer will not save the form since there is an error.
Answer: B
QUESTION NO: 62
Devon has placed the following code in the JS Header event of a form:
function userConfirm( )
{
if(confirm("Do you wish to continue"))
{
promptUser( );
}
}
function promptUser( )
{
x = prompt("Please enter some text", "");
-
8/10/2019 190-513 1-2 Lotus
45/63
alert(x);
}
There is a button on the form where the onClick event is: userConfirm( ).
Which one of the following will happen when the user chooses "Yes" in the confirmation prompt?
A. The promptUser( ) function will run and display an error message, "Please enter some text".
B. A run-time error will appear, stating that the promptUser( ) function is undefined, since it was defined
after the userConfirm( ) function.
C. The promptUser( ) function will run and ask the user to input a value,which will then be posted in a
confirm prompt.
D. The promptUser( ) function will run with an input prompt asking the user to input a value, which will
then be posted in an alert prompt.
Answer: D
QUESTION NO: 63
Look at the JavaScript code below.
var x = new String("Hello World!");
Which one of the following is contained in variable x?
A. The text "hello world!"
B. A string with the value "Hello World!"
-
8/10/2019 190-513 1-2 Lotus
46/63
C. A string object whose value is "Hello World!"
D. An array of strings, with two elements, "Hello" and "World!"
Answer: C
QUESTION NO: 64
Bob has created a button on his form that the user will click to save a page. Which one of the following
methods must he use?
A. window.document.forms[0].submit()
B. Window.document.forms[0].submit()
C. window.forms[0].save()
D. window.document.forms[0].Submit()
Answer: A
QUESTION NO: 65
In which one of the following events should Jim enter JavaScript code to validate a field in use for both
Notes clients and Web clients?
A. onBlur
B. onFocus
C. Input Validation
D. Exiting
-
8/10/2019 190-513 1-2 Lotus
47/63
Answer: A
QUESTION NO: 66
Look at the following JavaScript code segment:
winLocation=new String(window.location);
argStart=winLocation.indexOf("?",0);
winURL=winLocation.substring(0, argStart);
Which one of the following will complete this segment so that JavaScript will open the current Web page
in edit mode?
A. document.forms[0]=winURL+"?OpenForm"
B. open(winURL)
C. location =winURL+"?OpenForm"
D. location =winURL+"?EditDocument"
Answer: D
QUESTION NO: 67
When Jason selects an alternate name from the displayed ShipTo Address field, he picks "James Adair".
-
8/10/2019 190-513 1-2 Lotus
48/63
James Adair works at Creative Computing, 1 United Way, New York, NY, 10101, ph# 999-999-9999, fax#
999-999-9999, email
After selecting "James Adair" from the list, the getkeyval() function is triggered.
function getkeyval()
{
var winOpener=window.opener.document.forms[0];
with(window.document.forms[0].ShipToAddress)
{
var addr1=options[selectedIndex].value;
var addr2=addr1.split("~");
winOpener.ShipToContact.value=addr2[0];
winOpener.ShipToCompany.value=addr2[1];
winOpener.ShipToAdd1.value=addr2[2];
winOpener.ShipToAdd2.value=addr2[3];
winOpener.ShipToAdd3.value=addr2[4];
winOpener.ShipToCity.value=addr2[5];
winOpener.ShipToState.value=addr2[6];
winOpener.ShipToZip.value=addr2[7];
winOpener.ShipToCountry.value=addr2[8];
winOpener.ShipToPhone.value=addr2[9];
winOpener.ShipToFax.value=addr2[10];
winOpener.ShipToEMail.value=addr2[11];
}
}
}
-
8/10/2019 190-513 1-2 Lotus
49/63
Which one of the following variable descriptions is true?
A. The addr1 variable contains "James Adair~Creative Computing~~~New
DThe addr1 variable contains "James Adair";"Creative Computing";;;"New
York";"NY";"10101";"USA";"999-999-9999";"999-999-9999";"[email protected]"
B. The addr2 variable contains "James Adair".
C. The addr2 variable contains "James Adair".
D. The addr1 variable contains "James Adair".
E. The addr1 variable contains "James Adair~Creative Computing~~~New
F. The addr1 variable contains "James Adair";"Creative Computing";;;"New
York";"NY";"10101";"USA";"999-999-9999";"999-999-9999";"[email protected]"
Answer: A,E
QUESTION NO: 68
Mary needs to close the frameset in the Web browser and open the Video Review form in a frameless
window. The button where she will enter the code is located in the second frame of the frameset. Which
one of the following code segments does she enter in the onClick event of the button to accomplish
this?
A. window.top.location="Review?OpenForm"
B. window.self.location="Review?OpenForm"
C. window.opener.location="Review?OpenForm"
-
8/10/2019 190-513 1-2 Lotus
50/63
D. window.location="Review?OpenForm"
Answer: A
QUESTION NO: 69
Ann has written the following code in the Submit button onClick event:
if(window.document.forms[0].Email.value="")
{
alert("Please enter an email we can use to reply to your question.");
window.document.forms[0].Email.focus()
}
else
{
window.document.forms[0].submit() }
When she runs it, the else statement is never executed. Which one of the following code changes will
correct the error?
A. The code is correct. It needs to be moved to the onBlur event of the Email field.
B. if(window.document.forms[0].email.value="")
C. if(window.document.forms[0].Email.value=="")
D. if(Email.value="")
Answer: C
-
8/10/2019 190-513 1-2 Lotus
51/63
QUESTION NO: 70
Sally declared and initialized several variables in the JS Header. These variables referred to objects on
the form. Which one of the following describes what happened when the code was tested?
A. Initialization failed, since all JavaScript variables in Notes/Domino must be initialized within the
object.
B. Initialization failed, since the JS Header is interpreted before the HTML which creates the rest of the
objects.
C. Initialization was successful, but the variables were available only to objects also declared in the JSHeader.
D. Initialization was successful and the variables were available throughout the document.
Answer: B
QUESTION NO: 71
Which one of the following designated lines has incorrect code?
// initialize the variables
secsPerMin = 60; //
var minsPerHour = 60;
var hoursPerDay = 24;
var daysPerYear = 365;
// perform calculations
var secsPerDay = secsPerMin * minsPerHour * hoursPerDay; //
-
8/10/2019 190-513 1-2 Lotus
52/63
var secsPerYear = secsPerDay * daysPerYear;
document.writeln("There are ");
document.writeln(secsperYear); //
document.writeln(" seconds per year.
"); //
A.
B.
C.
D.
Answer: D
QUESTION NO: 72
Jon used the @IsMember @Function in his Notes application to search for the word "member" in a line
of text. Which one of the following JavaScript string methods would allow him to do a similar thing?
A. indexOf()
B. substr()
C. find()
D. split()
Answer: A
QUESTION NO: 73
-
8/10/2019 190-513 1-2 Lotus
53/63
Uma has written the following code to compare two values in the form onSubmit event:
resp=document.forms[0].city.value;
if (resp = 'Boston')
{
alert ("You are from Boston.");
}
else
{
alert ("You are not from Boston.");
};
Uma tests her form. However, every time she saves it, the alert says "You are from Boston.", even when
she enters "New York". Which one of the following causes this to happen?
A. There is no "End If" at the end of the If statement block.
B. The comparison operator to test equality should be "==".
C. The city field on the form is named "City", not "city".
D. The form name should be used to reference the form.
Answer: B
QUESTION NO: 74
Clara used three Domino subforms to create a page on the Web. How many HTML form tags were
rendered when it was opened in editmode?
-
8/10/2019 190-513 1-2 Lotus
54/63
A. None
B. Three
C. Two
D. One
Answer: D
QUESTION NO: 75
Martha has a frameset with two frames, called "Left" and "Right". In the Left frame is a button which will
set the field called "state" in the Right frame to "Florida". Which one of the following codes will set the
field?
A. parent.frames['Right'].document.forms[0].state.value = "Florida";
B. This cannot be done.
C. document.Right.forms[0].state.value = "Florida"
D. document.forms[0].state.value = "Florida";
Answer: A
QUESTION NO: 76
When a user clicks on a button and a new window is opened, which one of the following properties
refers to the parent window that has generated the new window?
A. window.opener
-
8/10/2019 190-513 1-2 Lotus
55/63
B. window.top
C. window.self
D. window.parent
Answer: A
QUESTION NO: 77
Karen is writing a JavaScript to display information about a movie when the user clicks a button. Which
one of the following characters will be ignored in Karen's script?
A. Colons
B. Parentheses
C. Single quotation marks
D. Tab characters
Answer: D
QUESTION NO: 78
Donna is using the history object to create a dynamic back button on a Video form. The history object is
under which one of the following objects?
A. Past
B. Window
C. Document
-
8/10/2019 190-513 1-2 Lotus
56/63
D. Location
Answer: B
QUESTION NO: 79
Norma wants to make sure the users selected a choice in a radio button field. Which one of the
following properties will tell her that a particular choice was selected?
A. selected
B. value
C. DselectedIndex
D. checked
Answer: D
QUESTION NO: 80
Rudolph has a frameset with two frames. In the left frame, Rudolph wants to have a button to load in
the Lotus home page into the right frame (which is called "Right"). Which one of the following button
codes will accomplish this?
A. top.location.assign("http://www.lotus.com");
B. parent.frames['Right'].value = "http://www.lotus.com";
C. parent.frames["Right"].location.assign("http://www.lotus.com");
D. window.location.assign("http://www.lotus.com");
-
8/10/2019 190-513 1-2 Lotus
57/63
Answer: C
QUESTION NO: 81
An application has a frameset with two frames placed side by side, Frame1 on the left, Frame2 on the
right. Amy wants to place a button on a page in the left frame (Frame1) that will write the value
"Reserve this video, please." into a text input field (FieldA) in the right frame (Frame2). Which one of the
following would be the correct JavaScript code for the onClick event of the button?
A. parent.frames[1].document.forms[0].FieldA="Reserve this video, please"
B. parent.frames[0].document.forms[0].FieldA.value="Reserve this video, please"
C. parent.frames[1].document.forms[0].fieldA.value="Reserve this video, please"
D. parent.frames[1].document.forms[0].FieldA.value="Reserve this video, please"
Answer: D
QUESTION NO: 82
Given the following code:
var x = document.forms[0];
Which one of the following is contained in the variable x?
A. A string that represents the form of the current page.
B. A form object for the current page.
C. A document object with the form referrer.
D. A string that contains the form name of the current page.
-
8/10/2019 190-513 1-2 Lotus
58/63
Answer: B
QUESTION NO: 83
Frank has a field that is a dialog list with different categories of videos. He wants to have a button that
will display the categories the user selected. Frank has written the following code so far:
selectField=document.forms[0].videotype;
sLen=selectField.options.length;
for(i=0;i
-
8/10/2019 190-513 1-2 Lotus
59/63
Edith wants to change a graphic whenever the user passes the cursor over the graphic in a Web
browser. Which one of the following describes how she can do this?
A. She should write the location (URL) of the new image to the value property of the image in the
onMouseOver event and set it back to the original image in the onMouseUp event.
B. She should write the location (URL) of the new image to the src property of the image in the
onMouseOver event and set it back to the original image in the onMouseOut event.
C. She should write the location (URL) of the new image to the src property of the image in the onSelect
event and set it back to the original image in the onMouseUp event.
D. She cannot do this; images cannot be changed.
Answer: B
QUESTION NO: 85
A JavaScript code segment was placed in the JS Header event of a form object. The beginning of that
segment looked like the following:
function validate(field)
{
if(validateRunning)
{
validateRunning=false;
return;
}
}
-
8/10/2019 190-513 1-2 Lotus
60/63
When the function was called, it did not work correctly. Which one of the following would prevent this
function from working properly?
A. validateRunning was declared and initialized in the calling event.
B. validateRunning is declared as a local variable only.
C. validateRunning was declared in the JS Header event and initialized in the calling event.
D. validateRunning was declared and initialized in the JS Header event.
Answer: A
QUESTION NO: 86
Marjorie created the following JavaScript code segment to check whether data had been entered into a
required field:
var frm=document.forms[0];
if(frm.LastName.value "")
Which one of the following operators should she have used for the ?
A. is
B. ==
C. :=
D. =
Answer: B
-
8/10/2019 190-513 1-2 Lotus
61/63
QUESTION NO: 87
An application has a frameset with two frames placed side by side, Frame1 on the left, Frame2 on the
right. Amy wants to place a button on a page in the left frame (Frame1) that will write the value
"Reserve this video, please." into a text input field (FieldA) in the right frame (Frame2). Which one of the
following would be the correct JavaScript code for the onClick event of the button?
A. parent.frames[1].document.forms[0].FieldA.value="Reserve this video, please"
B. parent.frames[1].document.forms[0].fieldA.value="Reserve this video, please"
C. parent.frames[1].document.forms[0].FieldA="Reserve this video, please"
D. parent.frames[0].document.forms[0].FieldA.value="Reserve this video, please"
Answer: A
QUESTION NO: 88
Sue is writing a function that uses the statement x == y. Which one of the following statements is true
regarding x == y?
A. It assigns the value to the left of the variable to the right.
B. It returns true if both logical expressions are true.
C. It assigns the value to the right of the variable to the left.
D. It returns true if the operands are equal.
Answer: D
QUESTION NO: 89
-
8/10/2019 190-513 1-2 Lotus
62/63
-
8/10/2019 190-513 1-2 Lotus
63/63
Which one of the following should be placed in the to find the position of a substring
within a string object?
A. subStr.indexOf(fullS);
B. fullStr.indexOf(subS);
C. fullStr.substring(0, subS);
D. substring(fullStr, subS);
Answer: B