-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSampleDialog.js
More file actions
32 lines (25 loc) · 1.16 KB
/
SampleDialog.js
File metadata and controls
32 lines (25 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
function showDialog( /* string */ url) {
// Do some argument checking.
if (typeof url != "string")
throw new Error.argument("url", "Expected a string.");
// Define dialog box options.
var options = {};
options.title = "Atlas Feedback";
options.url = url;
options.dialogReturnValueCallback =
function (dialogResult, returnValue) {
// If the user clicked the Finish button (equivalent to OK)
if (dialogResult) {
// Use an Ajax shortcut method to modify the DIV element.
//$get('displayDiv').innerHTML = "<h1>Thank you for participating!</h1>";
/* Notify User */
//SP.UI.Status.removeAllStatus(true);
//var sId = SP.UI.Status.addStatus("Feedback successfully submitted. Thanks!");
//SP.UI.Status.setStatusPriColor(sId, 'green');
alert("Your feedback has been successfully submitted. Thanks!");
}
};
// Display the dialog box.
//SP.UI.ModalDialog.showModalDialog(options);
SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);
}