svvvvgggggg

main
joak 2 years ago
parent b9dc75d82b
commit 7120061589

@ -11,8 +11,7 @@ def drawPlz():
name = request.form.get('lostobject') name = request.form.get('lostobject')
msg = "Sorry that you lost {name}. But {name} will be having fun somewhere." msg = "Sorry that you lost {name}. But {name} will be having fun somewhere."
if request.method == 'POST': if request.method == 'POST':
print("is this workhing?") image = request.form["data"]
image=request
print(image) print(image)
return render_template("drawing.html", title=title, msg=msg) return render_template("drawing.html", title=title, msg=msg)
@ -28,6 +27,7 @@ def index():
# Read the values from the form element. # Read the values from the form element.
name = request.form.get('lostobject', 'nana') name = request.form.get('lostobject', 'nana')
text = request.form.get('text', 'haha') 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. # 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.

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

Loading…
Cancel
Save