Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

jQuery - getJSON if data == success redirect to success page

0 votes
24 views
added Feb 9 in API by LC Marshal Lieutenant (13,870 points)
edited Jul 13 by LC Marshal
$.getJSON(submitUrl,
    function(data) {
      if (data == 'success'){
        console.log("redirecting..");
        window.location.replace("report-success.html");
      }
    }
);

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...