From 7cf083a612a7c8eb361122228cdb3e0ad2f89278 Mon Sep 17 00:00:00 2001 From: Jose Pabl Domingo Aramburo Sanchez Date: Thu, 9 Aug 2018 02:33:21 -0600 Subject: [PATCH] [add] Simple redirect --- api-payroll/public/js/login.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api-payroll/public/js/login.js b/api-payroll/public/js/login.js index 5d5deeb..707ec99 100644 --- a/api-payroll/public/js/login.js +++ b/api-payroll/public/js/login.js @@ -18,7 +18,7 @@ console.log(getbaseUrl('html/')); success:function(data){ console.log(JSON.stringify(data)); if(data["status"] == "success"){ - console.log("yhi"); + redirect("http://stackoverflow.com"); }else if(data["status"] == "success" || (data["status"] === undefined)){ $('#modalLoginError').modal('show'); document.getElementById('modalLoginErrorBody').innerHTML = "The server didn't respond in time, please try again or refresh this page."; @@ -31,4 +31,8 @@ console.log(getbaseUrl('html/')); } }, }); +} + +function redirect(url){ + window.location.replace(url); } \ No newline at end of file