I would like to pass a variable from which I can build a URL link and then would like to embed the link in html. I tried doing the following:
<div class="main">
<h2>Test App</h2>
<iframe id=my_url src="myFunction()" width="900" height="1300" frameborder="0" allowfullscreen></iframe>
<script type="text/javascript">
function myFunction() {
document.getElementById("my_url ").src = "www.google.com";
}
</script>
I eventually want to be able to get a variable from a flask app and create a URL and set it equal to document.getElementById("my_url ").src. But in the meantime, when I run this code I get a "404 Page Not Found" error. What am I doing wrong in the above example?
Thanks!