[jQuery] Get a request inside $.ajax()
<div dir="ltr">I with to open a page in the same browser window.
But it's only when a POST request return an error, link the sample below:
<span style="font-family: courier new,monospace;"> $.ajax({</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> type: "POST",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> url: "/url/",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> dataType: "json",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> data: data,</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> success: function() {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> },</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> error: function() {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> $.get("<a href="http://www.google.com">www.google.com</a>")</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> });</span>
If an error happen, I don't want to load the response of "<a href="http://www.google.com">www.google.com</a>", I want to really open in the browser's window.
</div>