Thread: Controlling Enter key in a form
Results 1 to 6 of 6
Related
-
Code for Large Pic or Logo when you enter Myspace Forum: Myspace Forum
Replies: 1 -
Controlling QuickTime with JS Forum: Javascript Forum
Replies: 0 -
ASP Forms - Enter Key Forum: ASP Forum
Replies: 1 -
Submitting form without pressing "Enter" Forum: HTML Forum
Replies: 1 -
Enter password Forum: HTML Forum
Replies: 3
-
01-31-2002, 10:35 PM #1
Controlling Enter key in a form
I have a form which is used for data entry. The users are complaining that they are used to the old mainframe mentality of hitting an enter key instead of tab. Alright, mainframes went out with the hula hoop. But I still need to figure out a way to stop this nonsense now.
I'm calling a PHP script, but need to catch the offending "Enter" key before the form is left because these users are performing a phone survey and don't want to loose their place.
Any ideas are greatly appreciated.
Dingusworrel
-
02-01-2002, 02:13 PM #2
ah ha
Welcome to the forums!
No matter how much people put down JavaScript, it does have its uses.
onsubmit, just call a function that checks whether all fields have content. If not, it bails the form submission.
Post if that doesn't help/need more.If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
02-01-2002, 06:24 PM #3
i don't mean to put down javascript either, but that can be done with php too(I know u know dean
) without refreshing the page, I have a script but javascript will work just fine. Either way. I can provide you with the php if u want?
-
02-01-2002, 06:43 PM #4
I know what you mean.
In this case, I thought that instant feedback would be preferable, as they are filling in a quiz.
You know how much I love phpin this example, tho, I felt JS would be simpler and more practical.
If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
02-01-2002, 10:16 PM #5
though the php way is a little bit more coding, the affect is a tad bit better. But JS would be much easier to code so I agree with you
but I always hate mixing php and JS... they just don't seam to like each other too much, espeiclaly if ur using them both on the same from
-
02-02-2002, 12:13 AM #6Originally posted by Derek
though the php way is a little bit more coding, the affect is a tad bit better. But JS would be much easier to code so I agree with youbut I always hate mixing php and JS... they just don't seam to like each other too much, espeiclaly if ur using them both on the same from
Your kidding right? PHP and JS are an awsome combo in alot more situations than you can think of
Eric
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum