In your form's onclick="validate()" method (or whatever it may be
called in your case), it may work to add "return" to the javascript
method call. The validate method will return false if validation
fails, and the form will not be submitted back to the server.

HTH,
-ed

On 10/3/06, priya <[EMAIL PROTECTED]> wrote:
I am using client-side and server-side validation in my login form.

Both work and when I dont enter the required fields I recieve a javascript
alert box saying that the fields "username or password are required". After
I click okay it does a serverside validation as well and prints on the
screen that the "username or password are required"..

I was wondering if its possible to show "username or password are required"
only once. When there is javascript enabled on the browser, to show the
client side version only and when javascript is disabled use the serverside
version?



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to