473,396 Members | 1,849 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,396 software developers and data experts.

Web form

I have
<input type="text" id="ip" class="input" value="" />

<input type="submit" value="Find" onclick="Find()" />
Now... if I click the submit button it works fine. but not when i press
enter in the text box. How do i get around this?

Thanks
Paul
www.pjenkins.co.uk

Jan 2 '07 #1
4 1046
pa**@pjenkins.co.uk wrote on 02 jan 2007 in comp.lang.javascript:
I have

<input type="text" id="ip" class="input" value="" />
<input type="submit" value="Find" onclick="Find()" />

Now... if I click the submit button it works fine. but not when i press
enter in the text box. How do i get around this?
This is not [primarily] a javascript Q.
A html NG seems more appropriate.
Please follow up on such NG unless you want to discuss a JS angle.

Still, after 10 seconds of Googling:
<http://ppewww.physics.gla.ac.uk/~flavell/www/formquestion.html>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 2 '07 #2

Evertjan. wrote:
pa**@pjenkins.co.uk wrote on 02 jan 2007 in comp.lang.javascript:
I have

<input type="text" id="ip" class="input" value="" />
<input type="submit" value="Find" onclick="Find()" />

Now... if I click the submit button it works fine. but not when i press
enter in the text box. How do i get around this?
Use <form onsubmit="Find()"instead.
And switch to the HTML list.

Best,
- Guillermo

Jan 2 '07 #3
Guillermo Rauch wrote on 02 jan 2007 in comp.lang.javascript:
>
Evertjan. wrote:
>pa**@pjenkins.co.uk wrote on 02 jan 2007 in comp.lang.javascript:
I have

<input type="text" id="ip" class="input" value="" />
<input type="submit" value="Find" onclick="Find()" />

Now... if I click the submit button it works fine. but not when i
press enter in the text box. How do i get around this?

Use <form onsubmit="Find()"instead.
If you quote on my answer, please include that.

If you quote on the earlier posting, please do not include me.
And switch to the HTML list.
I said so in my posting, why skip it and say the same?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 2 '07 #4
In comp.lang.javascript message <Xn********************@194.109.133.242>,
Tue, 2 Jan 2007 16:03:15, Evertjan. <ex**************@interxnl.netposted:
>Still, after 10 seconds of Googling:
<http://ppewww.physics.gla.ac.uk/~flavell/www/formquestion.html>
Pages by the late Alan Flavell (not necessarily in their final state) can
now be found via The Internet Archive at
<http://web.archive.org/web/20060426010624/ppewww.ph.gla.ac.uk/~flavell/>

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.
Feb 25 '07 #5

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

Similar topics

3
by: John | last post by:
Dear all, It been more than 3 days I am trying to debug this program, I interpret it using activePerl and it is giving (perl -wc code_process.pl) no error syntax but when I put it online, change...
5
by: Richard Cornford | last post by:
I am interested in hearing opinions on the semantic meaning of FORM (elements) in HTML. I have to start of apologising because this question arose in a context that is not applicable to the...
4
by: Targa | last post by:
Trying to total some price fields in a form but doesnt work when all the referenced form fields dont exisit. This is for an invoice - pulled prom a database and the form doesnt always contain the...
19
by: Raposa Velha | last post by:
Hello to all! Does any of you want to comment the approach I implement for instantiating a form? A description and an example follow. Cheers, RV jmclopesAThotmail.com replace the AT with the...
5
by: RAJ | last post by:
hi plz tell me how to know "how window is going to close"... i have to right code for X button of forms... plz telll me thanks bye
5
by: ortaias | last post by:
I have a form which calls up a second form for purposes of data entry. When closing the data entry form and returning to the main form, things don't work as expected. When I return to the main...
3
by: Bill | last post by:
I'm using the POST method to submit a simple form html page with yes/no and checkbox fields to an asp response page which stores the values in a new dim string, then uses it to build a new table...
5
by: Miro | last post by:
I will try my best to ask this question correctly. I think in the end the code will make more sence of what I am trying to accomplish. I am just not sure of what to search for on the net. I...
8
by: hoofbeats95 | last post by:
I don't think this should be this complicated, but I can't figure it out. I've worked with C# for several years now, but in a web environment, not with windows form. I have a form with a query...
5
by: simononestop | last post by:
Hi im totally new to perl this is my first go at using it (I normally use asp). I have set up a form with a cgi script from demon hosting. I have edited the script and the form works it sends me an...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.