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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form to Act Like the Address Bar

Status
Not open for further replies.

sickufu

ISP
May 26, 2001
1
US
I have one goal in mind: to make a form with only the functionality of the address bar.

User types in a URL, hits Enter, and gets sent there.

Odd question, I know, but I assure you there is a good reason for this.

Can someone post the HTML for a form that would do this? Pretty please?
 
give the form an ID and an onclick call in the html in the form tag. In the onclick, call a function you will put in the head section. the function should look somthing like this.
<head>
Function formsname onclick(){
window.navigate(place url here);
}
</head>


Todd Norris
Hope this helps !
 
hi
sickufu, try something like this:

function goThere(){
var loc=document.forms.my.txt1.value
top.location.href=loc
}


<form name=my>
<input type=text name-txt1>
<input type=button value=&quot;go!&quot; onclick=&quot;goThere()&quot;>
</form> Victor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top