forked from eclipse-platform/www.eclipse.org-swt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
debug.html
35 lines (32 loc) · 882 Bytes
/
debug.html
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
33
34
35
<html>
<head>
<script>
function connect() {
var field = document.getElementById('portText');
var url = "http://www.eclipse.org/swt/frames.html";//"localhost:" + field.value + "/json";
var xhr = XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
if (xhr) {
alert(url);
xhr.onreadystatechange=function() {
if (xhr.readyState == 4) {
alert(xhr.readyState + ":" + xhr.responseText);
}
}
xhr.onerror = function() {
alert("onerror: " + xhr.status);
};
xhr.open("GET", url, true);
xhr.send(null)
}
}
</script>
</head>
<body>
<textarea id="portText" rows="1" cols="99">
</textarea>
<input type=button id="connectButton" value="Connect" onClick="connect()">
<textarea id="console" rows="9" cols="99">
</textarea>
<input type=button id="evaluateButton" value="Evaluate" disabled="disabled" onClick="evaluate()">
</body>
</html>