-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
28 lines (24 loc) · 704 Bytes
/
Copy pathtest.html
File metadata and controls
28 lines (24 loc) · 704 Bytes
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
<html>
<head>
<title>System Plugin Demo</title>
</script>
</head>
<body>
<h1>System Plugin Demo</h1>
<hr>
<script>
//var system = document.getElementById("system").system;
//document.write('system.version = ' + system.version + '<br>');
//document.write(system.exec('zenity --file-selection'));
function selectfile() {
var system = document.getElementById('system').system;
var path = system.exec('zenity --file-selection');
document.getElementById('filepath').innerHTML = path;
}
</script>
<embed name="plugin" type="application/x-system" width="0" height="0" id="system"></embed>
<br>
<input type="button" value="Select File" onclick="selectfile();">
<span id="filepath"></span>
</body>
</html>