Ask coding questions

← Back to all posts
My Javascript isn't processing
ShivankChhaya (236)

I am trying to build a flask web application and I have a separate template for my HTML(user.html). I have my Javascript in the <script> tag, but I don't think it is processing. According to my code, The javascript should send an HTTP GET request to /sendmessage, and in my python, when it gets the request, it should print the query string. However, it is not printing anything, not even an empty string, and so I am confused if my Javascript is even getting processed. Also, my processRequest function is not getting called, because it should alert me when it is called. Could someone please provide me with some info?

Comments
hotnewtop
Coder100 (17136)

as you can see here you have two 'https://'

also i recommend using fetch, much easier to use!

ShivankChhaya (236)

@Coder100 slaps face You are always the one to expose my dumb mistakes in programming...

Coder100 (17136)

anyways it works for me, it is a bit slow tho so be patient

KHZ (122)

@ShivankChhaya There is no folder containing the js files in your REPL.

ShivankChhaya (236)

@KHZ I know that, my script is inside the script tag of HTML.