File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Problem with onsubmit event 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 "Problem with onsubmit event" Watch "Problem with onsubmit event" New topic

Problem with onsubmit event

Priya Lavti
Ranch Hand

Joined: Oct 11, 2004
Posts: 41
Hi all,

I am calling a function when submitting a form which returns true or false. I want to submit the form only if the function returns true otherwise nothing is to be done. Please tell me how it can be done.


SCJP 5.0
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
<form name="form1" onsubmit="return YourFunction()">

I agree. Here's the link:
subject: Problem with onsubmit event
It's not a secret anymore!