You don't need jQuery for that, you can use 1995-style JavaScript!
 
    error: function() {
        window.location = 'http://www.google.com/';
    }
 
Be sure to use the full URL including http:// as shown here.
 
-Mike


  _____  

From: Gewton Jhames

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:
    $.ajax({
        type: "POST",
        url: "/url/",
        dataType: "json",
        data: data,
        success: function() {
        },
        error: function() {
              $.get("www.google.com")
        }
    });

If an error happen, I don't want to load the response of "www.google.com", I
want to really open in the browser's window.


Reply via email to