This commit is contained in:
fencl
2025-11-04 13:50:38 +01:00
commit 024eb52a69
23 changed files with 2407 additions and 0 deletions

24
templates/index.html Normal file
View File

@@ -0,0 +1,24 @@
<!doctype html>
<html>
<head>
<title>The jQuery Example</title>
<h2>jQuery-AJAX in FLASK. Execute function on button click</h2>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"> </script>
<script type=text/javascript> $(function() { $("#mybutton").click(function (event) { $.getJSON('/SomeFunction', { },
function(data) { }); return false; }); }); </script>
<script type=text/javascript> $(function() { $("#mybutton2").click(function (event) { $.getJSON('/SomeFunction2', { },
function(data) { }); return false; }); }); </script>
<script type=text/javascript> $(function() { $("#mybutton3").click(function (event) { $.getJSON('/SomeFunction3', { },
function(data) { }); return false; }); }); </script>
</head>
<body>
<input type = "button" id = "mybutton" value = "Click Here" />
<input type = "button" id = "mybutton2" value = "Click Here" />
<input type = "button" id = "mybutton3" value = "Click Here" />
</body>
</html>