Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please Tweak This (URL target)

Status
Not open for further replies.
Joined
Apr 7, 2006
Messages
10
Location
US
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>
_____________________________________________
 
that's the exact same thing as what you said before isn't it?
(feeling like a dumbass at this point)


THANK YOU, THANK YOU, THANK YOU!!!!!!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top