Comments (4)
你在return之间,编写你自己的代码不就行了。
并且你可以修改finalResult的值,改为false表单就不会提交了。
Original comment by [email protected]
on 15 Dec 2009 at 9:08
- Changed state: Accepted
from rapid-framework.
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.
最终参考了
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.
Fixed
Original comment by [email protected]
on 18 Dec 2009 at 6:31
- Changed state: Fixed
from rapid-framework.
Related Issues (20)
- 建议自动生成代码模块完善对MyBatis的支持 HOT 1
- org.dbunit.dataset.NoSuchTableException: Did not find table 'name' in schema 'null'
- 安装时出错 HOT 3
- java.lang.IllegalStateException: Cannot create a session after the response has been committed
- ssi不能使用urlrewrite
- 使用的时候发现的一些问题
- webshpere下翻页显示有问题
- 我用maven2.x,咋下载不了你的版本文件呀
- maven 下载报错
- maven 执行 mvn eclipse:eclipse
- 用jtds连接sql server 2005无法取得字段中文注释
- 请问哪里定义了BaseMybatisDao?
- Maven构建项目失败,rapid4.0 HOT 2
- 有qq群吗
- Rapid-Framework有这个兄弟吗?不生成SSH,而是生成SS+JDBC的原生态SQL语句的5层代码? HOT 1
- 官方网站域名已经过期?
- 模板的语法
- maven构建的struts2+spring+ibates项目引入jar包后如何配置freemarker扩展功能
- sqlserver 2008 分页方言
- ibaits3生成后没有找到 对应的mapper文件
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rapid-framework.