Giter Site home page Giter Site logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 17, 2024
你在return之间,编写你自己的代码不就行了。
并且你可以修改finalResult的值,改为false表单就不会提交了。

Original comment by [email protected] on 15 Dec 2009 at 9:08

  • Changed state: Accepted

from rapid-framework.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 17, 2024
badqiu, 你好, 回复的好快,谢谢

目前是这样:

    new Validation(document.forms[0],{onSubmit:true,onFormValidate : function
(result,form) {
        var finalResult = result;
        alert(result);

    //  return disableSubmit(finalResult,'submitButton');

        return addOrgIdUserName();

    }});
    function addOrgIdUserName(){
    document.forms[0].j_username.value = document.forms
[0].orgId.value+"~###~"+document.forms[0].j_username.value;
    document.forms[0].submit();

    }

Original comment by [email protected] on 15 Dec 2009 at 9:25

from rapid-framework.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 17, 2024
最终参考了 
badqiu的代码,很好。很强大! 谢谢
<script>

    new Validation(document.forms[0],{onSubmit:true,onFormValidate : function
(result,form) {
        var finalResult = result;
        return addOrgIdUserName(finalResult,'submitButton');

    }});
    //提交前,把机构号和用户名整合,可做类似参考做为校验后的自定义功能
    function addOrgIdUserName(finalResult,submitButtonId) {
    if(finalResult) {
        document.forms[0].j_username.value = document.forms
[0].orgId.value+"~###~"+document.forms[0].j_username.value;
        document.getElementById(submitButtonId).disabled = true;
        return finalResult;
    }else {
        return finalResult;
    }
}

</script>

Original comment by [email protected] on 15 Dec 2009 at 9:46

from rapid-framework.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 17, 2024
Fixed

Original comment by [email protected] on 18 Dec 2009 at 6:31

  • Changed state: Fixed

from rapid-framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.