Hi All,
I am calling PreSaveAction() method in order to do some validation and show a custom Jquery Dialog box.
If i click on 'Agree' in Jquery dialog box, then it should continue to submit data on form to list.
My code is as follows
function agreeDisagree() { $j("#dialog").dialog({ title: "Terms & Conditions", width: 450, height: 280, modal: true, buttons: { Agree: function () { $j(this).dialog("close"); }, Disagree: function () { window.location='https://abc.com'; } } }); }
var $j = jQuery.noConflict(); function PreSaveAction(boolVal) { agreeDisagree(); }
<input id="btnEnroll" type="button" value="Enroll" name="btnSave" onclick="javascript:return PreSaveAction(); {ddwrt:GenFireServerEvent('__commit')}" />
So, i am trying to do is if click on Enroll-> Call PreSaveAction()->Do validation->After validation show 'Agree/Disagree' popup.-> If Agree then submit.