jQuery - redirect after ajax call
<p>I have the following code, however im having a problem getting window.location to work</p>

<pre><code>$('.test_container a').click(function() {

    $.ajax({
            url: $(link).attr('href'),
            type: 'GET',
            dataType: 'json',
            beforeSend: function() {
                $('#lightbox').show();
            },
            success: function(data) {
                $('#lightbox').hide();

                window.location(data);
            }
        });


    return false;
});
</code></pre>

<p>If window.location.replace is used instead it does work, however this then doesnt allow the brwser back buttons to work.</p>

<p>Does anyone know of any solution?</p>

<p>Thanks</p>
