C2040-922 Free Dumps Study Materials
Question 3: Liz wants to make the user confirm their action when they try and delete a document
from the
application using a delete button. The confirmation message needs to display the title of the
document in
it. What is the best way to compute this message?
A. In the client side event of the delete button use the following code:
if (confirm("Are you sure you want to delete the document "
+
document1.getItemValueString('title')))
{
return true;
}else{
return false;
}
B. In the client side event of the delete button use the following code:
if (confirm("Are you sure you want to delete the document "
+
"#{javascript:document1.getItemValueString('title')}"))
{
return true;
}else{
return false;
}
C. In the server side event of the delete button use the following code:
if (confirm("Are you sure you want to delete the document "
+
document1.getItemValueString('title')))
{
return true;
}else{
return false;
}
D. In the server side event of the delete button use the following code:
if (confirm("Are you sure you want to delete the document "
+
"#{javascript:document1.getItemValueString('title')}")
{
return true;
}else{
return false;
}
Correct Answer: B