Skip navigation

In the form, call onsubmit method
<form method=”post” action=”javascript:alert(‘Submitted’)” onsubmit=”handleSubmit()”>

definition of handleSubmit() function
function handleSubmit() {
var oEvent = EventUtil.getEvent();
// do your validation here

// take reference using any one method
//aForm = document.getElementById(“form1”);
//aForm = document.forms[“form1”];
//aForm = document.forms[0];
aForm = document.form1;


return false if your validation fails.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: