-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
76 lines (55 loc) · 2.54 KB
/
index.html
File metadata and controls
76 lines (55 loc) · 2.54 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<html>
<title>Web Channel Headless Demo</title>
<head>
<h1>Oracle Digital Assistant - Web Channel Headless Demo</h1>
<link rel="stylesheet" href="css/chatcontainer.css">
<link rel="stylesheet" href="css/recordbutton.css">
<link rel="stylesheet" href="css/checkboxswitch.css">
<script src="scripts/settings.js"></script>
<script src="scripts/web-sdk.js" onload="initSdk('Bots')"></script>
<script src="scripts/speakutterance.js"></script>
</head>
<body>
<h3>
<p id="networkStatus"></p>
</h3>
<div id="myDIV" class="header">
<h2 style="color: #fbaf08;">Hi, I am GERTY - your personal digital assistant</h2>
<input type="text" id="myInput" placeholder="Enter your query here and click Send">
<span onclick="newElement()" class="addBtn">Send</span>
<h3 style="color: #fbaf08; margin-top: 80px;" >Auto-Complete Suggestions:</h3>
<textarea id="autoSuggestionId" rows="4" cols="128"
readonly
placeholder="You will start viewing auto-complete suggestions as soon as you start entering your query."></textarea>
<h3 style="color: #fbaf08;">Turn on the microphone to speak your questions:</h3>
<button id="recButton"></button>
<script>
var inputValue = document.getElementById("myInput");
if (inputValue) {
console.log("addinng event listeners");
inputValue.addEventListener("keyup", function (event) {
if (event.keyCode === 13) {
event.preventDefault();
newElement();
}
if (event.keyCode === 32 || event.key === ' ') {
var inputValueTxt = inputValue.value;
console.log("passing keyword for autosuggestion" + inputValueTxt);
getAutoComplete(inputValueTxt);
}
});
}
</script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src="scripts/recordbutton.js"></script>
<h3 style="color: #fbaf08;">To enable the audio utterance of skill response, turn on this switch:</h3>
<label class="switch">
<input type="checkbox" id="checkToEnableAudio" onclick="audioForUtterance()">
<span class="slider round"></span>
</label>
</div>
<ul id="myUL">
<li><i>Your chat will appear here..</i></li>
</ul>
</body>
</html>