DroneDeploy
Search…
Popup Example
Dashboard Plugin
1
<!DOCTYPE html>
2
<html lang="en">
3
<head>
4
<meta charset="UTF-8">
5
<title>Popup: Dashboard Plugin</title>
6
<style>
7
body {
8
display: flex;
9
justify-content: center;
10
}
11
button {
12
width: 80%;
13
}
14
</style>
15
</head>
16
<body>
17
<button id="open">Open the Popup</button>
18
<script>
19
var openButton = document.getElementById('open');
20
21
openButton.addEventListener('click', function() {
22
new DroneDeploy({ version: 1 })
23
.then(function(dronedeployApi) {
24
dronedeployApi.Popup.open('My First Popup App!');
25
});
26
});
27
</script>
28
</body>
29
</html>
Copied!
Popup Plugin
1
<!DOCTYPE html>
2
<html lang="en">
3
<head>
4
<meta charset="UTF-8">
5
<title>Popup: Popup Plugin</title>
6
<style>
7
body {
8
display: flex;
9
justify-content: center;
10
}
11
button {
12
width: 80%;
13
}
14
</style>
15
</head>
16
<body>
17
<button id="close">Close the Popup</button>
18
<script>
19
var closeButton = document.getElementById('close');
20
21
closeButton.addEventListener('click', function() {
22
new DroneDeploy({ version: 1 })
23
.then(function(dronedeployApi) {
24
dronedeployApi.Popup.close();
25
});
26
});
27
</script>
28
</body>
29
</html>
Copied!
Copy link