Dynamic Update Variable Using Flask

preview_player
Показать описание
github repo for the code

Рекомендации по теме
Комментарии
Автор

Hi everybody, i just find the error; just, copy paste and enjoy:



<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MANAGMENT SOFTWARE VERSION 1.1.0</title>
</head>

<script type="text/javascript">
var intervalID = setInterval(update_values, 1000);
$SCRIPT_ROOT = {{ }};
function update_values() {
$.getJSON($SCRIPT_ROOT + '/_stuff',

function(data) {

console.log(data)
});

};



function stopTextColor() {
clearInterval(intervalID);
}

</script>

<body onload="update_values();">
<h1>ujule</h1>
<p>
<span id="result">?</span>
<script>

</script>
<button
</body>

</html><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MANAGMENT SOFTWARE VERSION 1.1.0</title>
</head>

<script type="text/javascript">
var intervalID = setInterval(update_values, 1000);
$SCRIPT_ROOT = {{ }};
function update_values() {
$.getJSON($SCRIPT_ROOT + '/_stuff',

function(data) {

console.log(data)
});

};



function stopTextColor() {
clearInterval(intervalID);
}

</script>

<body onload="update_values();">
<h1>ujule</h1>
<p>
<span id="result">?</span>
<script>

</script>
<button
</body>

bogotavr
Автор

Thank you for this! Exactly what I was looking for :)

vavrespaddr
Автор

Thank you...exactly what I have been looking for

anuragchaudhary
Автор

Any idea about updating web page whenever a table is updated in DB. (Server is running in Flask!)

deepaknayan
Автор

How to store real time data ex. temperature in time stamp using flask?

bhaveshkunbi
Автор

If the code does not work please change the following and try again.

File -> / Dynamic Update / dynamic1.py
line 22-> app.run ()
change -> app.run (host = '0.0.0.0', port = 80, debug = True)

pratikian
Автор

How would you do this if the URL changes for each user? $.getJSON($SCRIPT_ROOT + 'events/??UNIQUEID??',

adventurousmale
Автор

thanks brother for this
but i want to do like ...
use post request by postman in place of get request
how can do this
if u have any idea please reply .
thanks in advance

vedjangid
Автор

Thanks, but the code doesn't work. I copied it from your github rep, and got the following errors:
Uncaught SyntaxError: Unexpected token '{' (line 6)


Uncaught ReferenceError: $SCRIPT_ROOT is not defined (line16).

shalevshahar
Автор

I tried the same, but the value does not change

jamescathode
Автор

bruh I thought you are using windows 12

futuregaming