thanx a lot. it worked just fine.:-)
akbar
-----Original Message-----
From: Jonathan Karlen [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 24, 2000 2:04 AM
To: [EMAIL PROTECTED]
Subject: Re: small JS Q
You need to have your validation return false.
<script>
function validate {
form = window.document.forms[0];
if (form.field.value.length < 1) { return false; }
else { return true; }
}
<form method="post" action="script.cfm" onSubmit="return validate()">
Jon
----- Original Message -----
From: Akbar <[EMAIL PROTECTED]>
To: CF Talk (E-mail) <[EMAIL PROTECTED]>
Sent: Sunday, July 23, 2000 11:30 AM
Subject: small JS Q
> hi all,
>
> i have a very small JS problem. how can i stop a form from submitting?? i
> mean i have some validations to be done using JS and then when the
> conditions do not not satisfy its showing th alert but the form is getting
> submitted (i checked with both, form-action pages and also self submitting
> forms). any advise?
>
> thanx in advance
>
> akbar
> --------------------------------------------------------------------------
----
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.