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

Forms question

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?
--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk

Jul 20 '05 #1
3 1330
In article <bn*************@ID-174912.news.uni-berlin.de>,
la****@hotmail.com says...
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?

--
Hywel I do not eat quiche
http://hyweljenkins.co.uk/
http://hyweljenkins.co.uk/mfaq.php
Jul 20 '05 #2
In article <bn*************@ID-174912.news.uni-berlin.de>,
la****@hotmail.com enlightened us with...
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
-------------------------------------------------
Jul 20 '05 #3
kaeli hu kiteb:
In article <bn*************@ID-174912.news.uni-berlin.de>,
la****@hotmail.com enlightened us with...
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. :)


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.
--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk
Jul 20 '05 #4

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

Similar topics

4
by: JSM | last post by:
Hi, I have a form (FormA) which was loaded using Application.Run when my app loads. This form has a button which loads Form B using "FormB myForm=new FormB()". My question is, how do I access...
4
by: news | last post by:
Not really sure if this is a javascript problem or C# - sorry if in wrong place. Modal Forms Question in Web Application I have two web forms: Form1 and Form2 Form1 calls Form2 using...
7
by: MounilK | last post by:
Hi all, I am not sure if this is the right NG to post this question. If that's the case please point me to the correct NG. I have a class library(myLib.dll) which has a class(myClass) which has...
1
by: Jarek | last post by:
This may seem like a stupid question, but I really don't know the answer. In traditional VB programming, if I had two forms: Form1 and Form2, I could call Form2 from within Form1 by using its...
1
by: Amjad | last post by:
I'm trying to build an application with two Forms and to use functions created inside the class of Form1 with controls of Form2. Everytime I create a Form the .NET creates a new class of that...
0
by: Zac Maclean | last post by:
I have a .NETCF app that loads a SQLCE database with the main form and displays some info. Actual user input occurs on one of 4 other forms. I need to be able to switch between these forms...
4
by: Mika M | last post by:
Hi! If Windows Form -application has for example a button on Form1 which Click-event opens other Form2-form like... Dim f as New Form2 f.ShowDialog() If (f.DialogResult = DialogResult.OK)...
4
by: igendreau | last post by:
I have a form, set to "Continuous Forms" to kind of give that spreadsheet feel, but I need it in a Form because my detail section contains some buttons I need. In my form header, I have an "Add...
1
by: stanciutheone | last post by:
hi my name is valentin and i started to programm in C# for 2 weeks using SharpDeveloper, My questions is how can i create child forms because now i'm using just parent forms like: void...
9
by: Scott Stark | last post by:
Hello, I'm *just* delving into Windows forms-based programming without the benefit of any books, etc. I have a background in light ASP.NET work, so forgive me if this is a really basic question...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.