svvvvgggggg

main
joak 2 years ago
parent b9dc75d82b
commit 7120061589

@ -11,8 +11,7 @@ def drawPlz():
name = request.form.get('lostobject')
msg = "Sorry that you lost {name}. But {name} will be having fun somewhere."
if request.method == 'POST':
print("is this workhing?")
image=request
image = request.form["data"]
print(image)
return render_template("drawing.html", title=title, msg=msg)
@ -28,7 +27,8 @@ def index():
# Read the values from the form element.
name = request.form.get('lostobject', 'nana')
text = request.form.get('text', 'haha')
print(text)
# date = request.form['dd-mm-yyyy'] Q.How can I include date? Or maybe general date input? Sometimes ppl do remember when they lose sth. and somethimes they do not know.
# Write the submitted data to a file, which is
@ -51,4 +51,4 @@ def index():
if __name__ == '__main__':
APP.debug = True
APP.run(port = 5000)
APP.run(port = 5000)

@ -97,7 +97,8 @@ var xhr = new XMLHttpRequest();
function sender(){
xhr.open("POST", "/2ndpage", true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
someStuff=document.getElementById("svgElement");
xhr.send(someStuff);
console.log("I'm sending")
someStuff=document.getElementById("svgElement").innerHTML;
xhr.send("data="+someStuff);
console.log(someStuff);
console.log("I'm sending");
}

Loading…
Cancel
Save