This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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

Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
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: 15376
<form name="form1" onsubmit="return YourFunction()">

Don't get me started about those stupid light bulbs.
subject: Problem with onsubmit event