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

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

0 votes
7 views
added Feb 9 in jQuery by LC Marshal First Warrant Officer (8,170 points)

$.getJSON(submitUrl,
    function(data) {
      if (data == 'success'){
        console.log("redirecting..");
        window.location.replace("report-success.html");
      }
    }
);

Please log in or register to example this solution.

lazacode.org - Malaysia based Knowledge Exchange Platform, where you can share your finding or solution with other members of community.
...