tags:

views:

92

answers:

3

Hello,

How what data should i echo from the server to ajaxically redirect my page? Say, suppose this my jquery :-

$.ajax({
            type: "POST",
            url : '<?php echo base_url() ?>Admin/AddNotice',
            data: {noticeTitle: $('#title').val(),noticeDesc : $('#desc').val() },
            success: function(msg){
                //here i want to redirect..fill in the blank please.
            }
        });

Thanks in advance :)

+10  A: 

It's pretty easy:

window.location = "http://www.google.com";

;)

Andrea Zilio
@Andrea Zilio :- Thanks :)
Ankit Rathod
+4  A: 

I don't know what you mean by "ajaxically redirect", but if you simply want the browser to redirect to another page, you can use window.location = 'http://wherever/you/want/to/go/';

casablanca
+3  A: 

Use:

success: function(msg){
  window.location = "page.html";
}
Sarfraz