I have a form where I want to load the content after submiting into an iframe Javascript: <script> function go(){ var L1 = document.theform.list1.value; if (L1!= "#") { var url = "http://www.url.com/" + L1 + ".html"; { window.location = url; return false; } } } </script> HTML: The form: <form name="theform"> <input name="list1" type="text" style="background-color:#ffffff; color: #666666; width: 160px;" size="20"> <input type="button" value="GO" onclick="go()"/> </form> HTML: The iframe: <iframe name="lastframe" id="lastframe" SRC="lastframe.html" width="200" height="100" frameborder="0" marginwidth="0" marginheight="0" ></iframe> HTML: How can I get this content target into an iframe? Thanks, Fredrik
Hey it looks like I solved it. I changed { window.location = url; return false; } HTML: to document.getElementById("lastframe").src = url; HTML: