Hello and welcome to our community! Is this your first visit?
Register
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
    Posts
    8
    Thanks
    0
    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
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,028
    Thanks
    75
    Thanked 4,323 Times in 4,289 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.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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