473,399 Members | 3,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Putting an URL from FORM to address bar (no new window)

Hi,

I've spent some time using google, and reading basic manuals about Java
Scripts and forms, but I can't find solution to this simple problem.

In web page I want a such type of form like shown below. When someone
enters an URL to text box, and hits return or clicks on "go" button,
browser would load desired page (but without opening new page).

<form name="enter_url">
<input type="text" name="address" >
<input type="button" name="go" value="GO">
</form>

Could someone write a JavaScript code that makes it ? and where I should
put it in form ?

Tired of looking and trying

Kuba Gladykowski
Jul 23 '05 #1
2 1873
Kuba Glad wrote on 04 apr 2004 in comp.lang.javascript:
I've spent some time using google, and reading basic manuals about Java
Scripts and forms, but I can't find solution to this simple problem.

In web page I want a such type of form like shown below. When someone
enters an URL to text box, and hits return or clicks on "go" button,
browser would load desired page (but without opening new page).

<form name="enter_url">
<input type="text" name="address" >
<input type="button" name="go" value="GO">
</form>


<form
onsubmit="
location.href=
document.getElementById('myText').value;
return false;">

<input type="text" id="myText">
<input type="submit" value="GO">
</form>

URL with http:// necessary, both enter and button click work

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 23 '05 #2
It really works - thank you veeeeery much.
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Peter | last post by:
For some unknown reason my Form Layout Window has stopped showing a form on it. I can open & close the window, set docking on/off but no form. The right click start-up options are also greyed out....
1
by: Shayne H | last post by:
I want to be able to add a clock to the title of a VB.NET form. Simply updating the FormClass.Text property does not quite make it, the titile only changes once the form is minimised/maximised....
1
by: humbads | last post by:
I am trying to get a popup window to work for editing notes in my application. Here's how I implemented it: The original frame is called ORIGINALFRAME and contains a link like this: <a...
2
by: UJ | last post by:
How can I open a window, preferably through a hyperlink, that will open a new window with no menu bar/address bar and is a specific size? TIA - Jeffrey.
0
by: Fred | last post by:
hi, i have a popop w/ a datagrid, one of the columns contains checkboxes, how to get a datagrid in the parent window w/ only the selected in the popup items? TIA
0
by: Kevin C Smith | last post by:
Hi there. I have a custom object implementing IBindingList and ITypedList. I use it to provide a DataSource to a DataGrid. This works in Win and Web forms, but I only get the DataMember list in...
19
by: sphinney | last post by:
My company is in the process of upgrading everyone to Access 2007. Since my machine was upgraded I've been highly frustrated with an apparent random behaviour byAccess that I can't understand. It...
1
by: Cainnech | last post by:
Hi, In one of my scripts I'm having difficulties adding fromvalues to an array. For testing purposes I made an array like this: var mijnlotto1 = ; This way my script works.
12
by: Lahiru778 | last post by:
I require to appear the Name which i click on the "new.php" page in the "Window_open.php" page..I use some Java Script also to accomplish this but I couldn't.. Could you pleas Help ...!!! ...
9
by: viki1967 | last post by:
Hi all. I have this JavaScript function that copy the value ( selected in a select open in a window popup), in the hidden main form field. I need this changes: 1) If the popup window is not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.