Client side javascript validation

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
8/4/2017 4:52:28 AM
Gravatar
Total Posts 1

Client side javascript validation

Hello

I have a custom form with javascript validation. When i click submit button page does't stop on js validation but reload to server side method. This is my sample form page:

 

        <div class="form-actions"> 
            <asp:Button type="button" runat="server" ID="test" Text="asp button" OnClick="test_Click" OnClientClick="test();" />
        </div>  
<script>
    function test() {
        console.log("test");
        return false;
    }
</script>

 

I need validate js first, then is ok button can navigate to code behind method "test_Click"

8/8/2017 9:49:27 AM
Gravatar
Total Posts 1991

Re: Client side validation

Hello Robert,

Does the answer on this post help you?

Thanks,
Joe