FOREWARNING: I HAVE NOT TESTED THIS!
I am basing this all on logic, so I am sorry if this does not work. However, I think it will help you get the right idea or maybe even a new way to think of it. Hope it helps:
Code:
<script language="javascript">
function changeIFRAMETONEWURL(elem, elem2)
{
var string = document.getElementById(elem);
var frame = document.getElementById(elem2);
frame.src = string.value;
}
</script>
<iframe
src ='userInput' id="frm"
width="100%">
</iframe>
<input type='text' id='userInput' value="http://www.w3schools.com/TAGS/tag_iframe.asp"/>
<input type='button' onclick='javascript:changeIFRAMETONEWURL(userInput, frm);' value='Change Url'/>
Bookmarks