preloader icon
light-dark-switchbtn
Sign up - Onward Capital
$(document).ready(function(){ $("#errorshow1").hide(); }); $("form#register").submit(function(e) { e.preventDefault(); var formData = new FormData(this); formData.append('request', 'signup'); if ($("#country").val() == null) { $("#errorshow1").html("Select a country").show(); setTimeout(function(){ $("#errorshow1").hide(); }, 10000); }else{ $.ajax({ url: './ops/users', type: 'POST', data: formData, beforeSend:function(){ $('#errorshow1').html("Creating account ").show(); }, success: function (data) { let resp = $.parseJSON(data); if (resp.status == "success") { // document.getElementById("errorshow1").scrollIntoView(true); $("#errorshow1").html(resp.message).show(); setTimeout(' window.location.href = "./signin"; ', 10000); }else{ // document.getElementById("errorshow1").scrollIntoView(true); $("#errorshow1").html(resp.message).show(); setTimeout(function(){ $("#errorshow1").hide(); }, 10000); } }, cache: false, error:function(){ $('#errorshow1').html("An error has occured!!").show(); setTimeout(function(){ $("#errorshow1").hide(); }, 10000); }, contentType: false, processData: false }); } });