messing around with javascript/flask