Created
December 29, 2011 06:42
-
-
Save codewithcats/1532424 to your computer and use it in GitHub Desktop.
index.jsp script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var errorMsgs = { | |
txtUSER_NAME: '- โปรดระบุ <bean:message bundle="<%=com.wealth.sellingagent.controller.DefaultDisplay.language%>" key="label.username"/>', | |
txtPASSWORD: '- โปรดระบุ <bean:message bundle="<%=com.wealth.sellingagent.controller.DefaultDisplay.language%>" key="label.password"/>' | |
}; | |
$('#loginForm').validate({ | |
onfocusout: false, | |
onkeyup: false, | |
onclick: false, | |
rules: { | |
txtUSER_NAME: 'required', | |
txtPASSWORD: 'required' | |
}, | |
messages: { | |
txtUSER_NAME: '*', | |
txtPASSWORD: '*' | |
}, | |
showErrors: function(errorMap, errorList) { | |
if(!errorList.length) return; | |
this.defaultShowErrors(); | |
var msg = ''; | |
for( var k in errorMap) { | |
msg += errorMsgs[k] + '\n'; | |
} | |
alert(msg); | |
} | |
}); | |
$(document).ready(function() { | |
$(this).bind('contextmenu', function(e) {e.preventDefault();}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment