File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Disable form submit on carriage return in a text box for MAC systems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Disable form submit on carriage return in a text box for MAC systems" Watch "Disable form submit on carriage return in a text box for MAC systems" New topic
Author

Disable form submit on carriage return in a text box for MAC systems

sripal jain
Greenhorn

Joined: Sep 10, 2002
Posts: 10
Hi All,
I have a problem that is specific to MAC systems . The problem is when i press enter button(carriage return ), when the focus is on text box the form gets submitted. Is there any way in which i can handle it not to submit and gets submitted only when the Submit button is clicked.
This is very urgent and important and if any body knows the solution do not delay and send that to me.
Thanks in Advance...
Sripal
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4339
    
    2

yes, you can use type="button" instead of type="submit"

<input type="button" on_click="document.myform.submit">

i believe that is the proper syntax where "myform" is the name of your form (remove the underscore).


SCJP
Visit my download page
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Disable form submit on carriage return in a text box for MAC systems
 
Similar Threads
handle radio buttons in servlet
Unable to submit form in single click
type "button" vs "submit"
basic doubt
Problem in Reset button.