funkeywoookey
MIS
I have the following code, but I want it so that when I click "Go" the URL loads in an iframe (iframe's name="frame1).
_____________________________________________
<script type="text/javascript">
function goToURL(form) {
query = form.query.value;
if(query == null || query == "") {
alert("Error: Missing URL");
return false;
}
document.location.href = query;
return false;
}
</script>
<form onsubmit="return goToURL(this)" action="">
<input name="query" type="text" size="50" maxlength="255" value=" />
<input type="submit" value="Go"/>
</form>
<br>
<iframe name="frame1" src=" width="1024" height="768"></iframe>
_____________________________________________
_____________________________________________
<script type="text/javascript">
function goToURL(form) {
query = form.query.value;
if(query == null || query == "") {
alert("Error: Missing URL");
return false;
}
document.location.href = query;
return false;
}
</script>
<form onsubmit="return goToURL(this)" action="">
<input name="query" type="text" size="50" maxlength="255" value=" />
<input type="submit" value="Go"/>
</form>
<br>
<iframe name="frame1" src=" width="1024" height="768"></iframe>
_____________________________________________