Forms question

F

Fabian

Is there a way to disable the submit functionality built into a text
box, or to redirect it into calling a javascript function without
submitting?
 
H

Hywel Jenkins

Is there a way to disable the submit functionality built into a text
box, or to redirect it into calling a javascript function without
submitting?

Text boxes don't have submit functionality. What are you trying to do?
 
K

kaeli

Is there a way to disable the submit functionality built into a text
box, or to redirect it into calling a javascript function without
submitting?

If you mean you'd prefer the browser not do the default action of
submitting a form when the enter key is pressed, you can capture the
enter key and do something else. The code has been posted here several
times. Check the archives (google has nice archives at
http://groups.google.com).

It's not recommended, though. It basically breaks what the user is used
to - which can have implications with disabled people with special
browsers, too. It also irritates the hell out of people who are used to
their browsers doing something, then it doesn't. If this is for an
intranet application, CD-ROM, or game, disregard that. :)


-------------------------------------------------
~kaeli~
Jesus saves, Allah protects, and Cthulhu
thinks you'd make a nice sandwich.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------
 
F

Fabian

kaeli hu kiteb:
If you mean you'd prefer the browser not do the default action of
submitting a form when the enter key is pressed, you can capture the
enter key and do something else. The code has been posted here several
times. Check the archives (google has nice archives at
http://groups.google.com).

It's not recommended, though. It basically breaks what the user is
used to - which can have implications with disabled people with
special browsers, too. It also irritates the hell out of people who
are used to their browsers doing something, then it doesn't. If this
is for an intranet application, CD-ROM, or game, disregard that. :)

Thanks. I found it in the archives. It isnt exactly for the above. It is
more to demonstrate the functionality of one of my string manipulation
functions. All is right with teh world now, or at least, my little
corner of it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top