var acctID = "31376"; var btnID = "[yourSubmitButtonID]"; var formID = "[yourFormID]"; var domain = "https:\/\/davinci.mindfireinc.com\/"; var notgoing = true; $('#'+formID).submit(function(e) { if(notgoing){ console.log(" prevent Default "); e.preventDefault(); } }); $('#'+btnID).on("click",function(e) {e.preventDefault(); sbmfrm(); notgoing=false; console.log("Submit Again."); $('#'+formID).submit();} ); function sbmfrm(){ console.log("sbmfrm"); var exparam = ["firstname","lastname","email"]; var sdata = $('#'+formID).serializeArray(); var text = ""; var isNext = false; for(var i=0;i()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(email); }