fortran_cookie
New Coder
Sorry if this is a stupid question- I have a project that displays a site in an iframe based on a text box input. I need some way to set the iframe src as a variable so that the iframe can display multiple sites. However, this does not work, and I've scoured the internet for a solution, and can't find it. Here's my code so far: (x is the variable from the text box)
Thanks.
HTML:
<iframe id="linkhere" scrolling="yes" height="350" width ="1509" src=""></iframe>
<script>
document.getElementById("linkhere").src = x;
</script>
Last edited by a moderator: