473,396 Members | 2,002 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.

form submit

hari,

I do not want to allow uders to send the form just by pressing ENTER,
just by clicking on the submit button. how can I do it?

rrd

Jul 20 '05 #1
6 1461
Hello,

Don't put a button of type 'submit' then on the button that you want to have
the form submitted, have its type as type='button' and onclick handler as
onclick='this.form.submit()'

--
Elias
"Radharadya dasa" <ra********@freemail.hu> wrote in message
news:br**********@namru.matavnet.hu...
hari,

I do not want to allow uders to send the form just by pressing ENTER,
just by clicking on the submit button. how can I do it?

rrd

Jul 20 '05 #2
On Mon, 8 Dec 2003 14:50:54 +0200, "lallous" <la*****@lgwm.org> wrote:
Hello,

Don't put a button of type 'submit' then on the button that you want to have
the form submitted, have its type as type='button' and onclick handler as
onclick='this.form.submit()'


Which means that anyone without Javascript is completely unable to use
the form. Welcome to my new page:
http://www.xs4all.nl/~sbpoley/webmatters/formval.html
Perhaps the best response to the OP (whose question has been lost
because you turned it into a sig) would be to ask why he wants to
prevent a user from submitting using the Enter key. What actual problem
is he trying to solve? Some users prefer to use the Enter key, after
all.

--
Stephen Poley
Jul 20 '05 #3
hari,

OK. So my problem is that I do not want to let the user to send the form
just in that case if he/she filled ALL the input fields.

rrd

Perhaps the best response to the OP (whose question has been lost
because you turned it into a sig) would be to ask why he wants to
prevent a user from submitting using the Enter key. What actual problem
is he trying to solve? Some users prefer to use the Enter key, after
all.


Jul 20 '05 #4
Radharadya dasa wrote:
I do not want to allow uders to send the form just by pressing ENTER,
just by clicking on the submit button. how can I do it?


You want to manipulate the behavior of their software
they are used to in an unexpected way? Great.
PointedEars
Jul 20 '05 #5
Radharadya dasa wrote:
OK. So my problem is that I do not want to let the user to send the
form just in that case if he/she filled ALL the input fields.
That is a form validation problem, why don't you read previous answers
before you ask that question again?
[Top post]


Please stop doing that. Place you answer below the line(s) of quote you
are reffering to and remove the line(s) of quote you are not referring
to, just as you see here.
PointedEars
Jul 20 '05 #6
Top-posting corrected: perhaps you could have a quick read of
http://www.xs4all.nl/~sbpoley/toppost.htm
On Mon, 08 Dec 2003 18:01:57 +0100, Radharadya dasa
<ra********@freemail.hu> wrote:
Perhaps the best response to the OP (whose question has been lost
because you turned it into a sig) would be to ask why he wants to
prevent a user from submitting using the Enter key. What actual problem
is he trying to solve? Some users prefer to use the Enter key, after
all.

OK. So my problem is that I do not want to let the user to send the form
just in that case if he/she filled ALL the input fields.


Right. The page I mentioned covers that:
http://www.xs4all.nl/~sbpoley/webmatters/formval.html
--
Stephen Poley
Jul 20 '05 #7

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

Similar topics

1
by: monika | last post by:
hi ... I have an asp page which has 3 buttons. <p align="center"><input class="button" type="button" onClick="location='welStudent.asp';" value="Click to write a new story"></p> <p...
2
by: Matt | last post by:
Can form.submit() submit another form? In the following example, in page1.asp, it is fine to submit the current form: form1.submit(), and and I could see the value "Joe" in page2.asp. However, if I...
2
by: Terence Parker | last post by:
How does one go about submitting a form with a link - but submitting it to a new window AND to a page different to that described within the action="" option of the <form> tag? Say, for example,...
4
by: Sarah | last post by:
Hi all. I have a form, and several text and image links on it that should submit the form with different actions. I prepared a simple page with just the code that's not working. PROBLEM:...
15
by: M Smith | last post by:
I have a form I want to submit to itself. I want to be able to type in a list of numbers and submit the form and have that list show up on the same form under the text box I typed them into and...
6
by: CJM | last post by:
Can somebody clarify if/how/when a simple form is submitted when the <Enter> key is pressed? As I understood it, if you have a form with a single submit button, if enter is pressed, the form...
4
by: Stuart Perryman | last post by:
Hi, I have the following code which works just fine in IE6 but not in Firefox. It is an extract of several table rows each with an individual form. It is generated by php. <form...
5
by: rjames.clarke | last post by:
I have the following. $result=mysql_query($sql); $nrows=mysql_num_rows($result); for ($i=0;$i<$nrows;$i++) { $row_array=mysql_fetch_row($result); echo "<form name='testform'...
5
by: Navillus | last post by:
Hey gang, I have a login form that is empty by default, but can be filled with values from a previous form: <input type=text maxlength="40" size="40" name="user" value="`usr`"> <input...
1
by: gbezas | last post by:
Hi All, I have added an event handler to redirect form.submit() to a newSubmit() method that I have defined (which does some additional processing before submitting the form). Additionally I...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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...

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.