debisoft commited on
Commit
0adf31a
·
1 Parent(s): 6589407
Files changed (1) hide show
  1. main.py +11 -8
main.py CHANGED
@@ -32,21 +32,24 @@ function load()
32
  $( "#chat_form" ).on( "submit", function( event ) {
33
  alert( "Handler for `submit` called." );
34
  //event.preventDefault();
35
- setTimeout(function() {
36
- messages_input = $("#chat_form :input[name='messages']");
37
- alert(messages_input);
38
- console.log(messages_input);
39
- }, 1000);
40
  });
41
 
42
 
43
- messages_input = $("#chat_form :input[name='messages']");
44
- alert(messages_input);
45
- console.log(messages_input);
46
  //messages_input.change(function(){
47
  //alert("The text has been changed.");
48
  //});
49
  }
 
 
 
 
 
 
 
50
  setTimeout(load, 1000);
51
 
52
  """
 
32
  $( "#chat_form" ).on( "submit", function( event ) {
33
  alert( "Handler for `submit` called." );
34
  //event.preventDefault();
35
+ setTimeout(handle_post, 1000);
 
 
 
 
36
  });
37
 
38
 
39
+ //messages_input = $("#chat_form :input[name='messages']");
40
+ //alert(messages_input);
41
+ //console.log(messages_input);
42
  //messages_input.change(function(){
43
  //alert("The text has been changed.");
44
  //});
45
  }
46
+
47
+ function handle_post() {
48
+ messages_input = $("#chat_form :input[name='messages']");
49
+ alert(messages_input);
50
+ console.log(messages_input);
51
+ }
52
+
53
  setTimeout(load, 1000);
54
 
55
  """