rohan13 commited on
Commit
31a231c
·
1 Parent(s): 4437fdc

js code for sample queries

Browse files
Files changed (1) hide show
  1. static/chatbot.js +14 -0
static/chatbot.js CHANGED
@@ -19,6 +19,20 @@ $(document).ready(function() {
19
 
20
  // Initialize SocketIO connection
21
  var socket = io.connect('https://' + document.domain + ':' + location.port);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  // Function to send message to Flask-SocketIO app
24
  function sendMessage(message) {
 
19
 
20
  // Initialize SocketIO connection
21
  var socket = io.connect('https://' + document.domain + ':' + location.port);
22
+ const container = document.getElementById("button-container");
23
+
24
+
25
+ for (let i = 0; i < buttonLabels.length; i++) {
26
+
27
+ const button = document.createElement("button");
28
+ button.innerHTML = buttonLabels[i];
29
+ button.setAttribute("class", "queries");
30
+ button.setAttribute("id", `button-${i}`);
31
+ button.style.margin = "5px";
32
+ container.appendChild(button);
33
+ }
34
+ scrollButtons();
35
+
36
 
37
  // Function to send message to Flask-SocketIO app
38
  function sendMessage(message) {