I have not experience in jQuery. I use validation plugin. But I should change position of error message baloon. Here is default parameters for validation function.
a.validationEngine = { defaults: { validationEventTrigger: "blur", scroll: true,
focusFirstField: true, promptPosition: "topRight", bindMethod: "bind",
inlineAjax: false, ajaxFormValidation: false, ajaxFormValidationURL: false,
onAjaxFormComplete: a.noop, onBeforeAjaxFormValidation: a.noop,
onValidationComplete: false, isOverflown: false, overflownDIV: "",
binded: false, showArrow: true, isError: false,
ajaxValidCache: {}, autoPositionUpdate: false, InvalidFields: [],
onSuccess: false, onFailure: false } }
I want to change promptPosition: "topRight" to promptPosition: "bottomLeft". When I change that parameter's value at the top function, it works.
In page I want to add promptPosition: "bottomLeft" parameter to following function. How can I do it?
<script>
jQuery(document).ready(function () {
jQuery('#userSignInForm').validationEngine('init');
jQuery('#signInButton').click(function () {
jQuery('#userSignInForm .loading').animate({ opacity: 1 }, 850);
if (jQuery('#userSignInForm').validationEngine('validate')) {
jQuery.post('/Profile/SignIn', {
UserName: jQuery('#UserName').val(),
Password: jQuery('#Password').val(),
formname: 'user_SignIn_Form',
formtype: 'userSignInF'
}, function () {
jQuery('#userSignInForm .loading').hide();
});
return false;
} else {
return false;
}
});
});
</script>
Send the parameters on initialisation :
jQuery('#userSignInForm').validationEngine('init', {
promptPosition: "bottomLeft"
});
instead of
jQuery('#userSignInForm').validationEngine('init');
should do the trick.