Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2012
    Thanked 0 Times in 0 Posts

    how to call a method and js?

    I don;t know how it is done :S
    I have a button that has an onclick event which I want to happen unless validation fails.
    So I got validation done by server atm and thought of replacing it by jscript but I have no idea in it and have no time to start digging into it.
    How can I get the button to trigger jscript which will stop sending to server and if jscript returns true will trigger the method?
    what is the syntax?

  2. #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Thanked 4,947 Times in 4,908 Posts
    Why are you asking this in the ASP forum. It is a JavaScript question and should be in the JavaScript forum.

    Form validation questions are probably the MOST ASKED (and most answered) of all questions in the JavaScript forum. Form validation is well known in many many varieties.

    HINT: If you want a *good* answer, show your <form> and the field(s) that need to be validated when you post in the JavaScript forum.
    Be yourself. No one else is as qualified.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts