Ask coding questions

← Back to all posts
Javascript Refuses to Render in Flask
AgentLoneStar

Hi. I have had more trouble with Flask than I think I've had with any other program ever. I can render the HTML file fine. I can get the files and the bot going without issue. BUT I CAN'T GET JAVASCRIPT TO RENDER! I'm trying to create a jQuery Terminal webpage using Flask, but it won't work. Any ideas?

Voters
AgentLoneStar
Comments
hotnewtop
AgentLoneStar

No issues. I had a bug in my Javascript file that Replit didn't notice. I had to debug the file using Google Chrome web console.

ruiwenge2

move the static folder out of the templates folder

you’ll be able to access the file at /static/js/script.js

AgentLoneStar

@ruiwenge2 Thanks, that worked. It can find the file fine now. IT'S STILL NOT RENDERING THE JAVASCRIPT!!!