70-573 · Question #257
You are creating an application page that will open a dialog box. The dialog box uses a custom master page. You write the following code segment. (Line numbers are included for reference only.) 01…
The correct answer is A. Add a script link that references SP.js. MNEMONIC RULE: "SP.js" SP.UI namespace is defined in SP.Core.js, SP.js, SP.UI.Dialog.js files. JavaScript Class Library
Question
You are creating an application page that will open a dialog box. The dialog box uses a custom master page. You write the following code segment. (Line numbers are included for reference only.) 01 <script type="text/javascript"> 02 function DialogCallback(dialogResult, returnValue) 03 { 04 } 05 function OpenEditDialog(id) 06 { 07 var options = { 09 width: 300, 10 height: 300, 11 dialogReturnValueCallback: DialogCallback 12 }; 13 SP.UI.ModalDialog.showModalDialog(options); 14 } 15 </script> You need to ensure that the code opens the dialog box. What should you do?
Options
- AAdd a script link that references SP.js.
- BAdd a script link that references SharePoint.Dialog.js.
- CAt line 13, change showModalDialog to openDialog.
- DAt line 13, change showModalDialog to commonModalDialogOpen.
How the community answered
(32 responses)- A72% (23)
- B9% (3)
- C6% (2)
- D13% (4)
Explanation
MNEMONIC RULE: "SP.js" SP.UI namespace is defined in SP.Core.js, SP.js, SP.UI.Dialog.js files. JavaScript Class Library
Topics
Community Discussion
No community discussion yet for this question.