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.
}
});
One can use the anchor tag to redirect to a particular section on the same page. You need to add ” id attribute” to the section you want to show and use the same id in href attribute with “#” in the anchor tag.
How to Redirect to Another Page in HTML. To redirect one HTML page to another page, you need to add a <meta> tag inside the <head> section of the old HTML page. The <head> section of an HTML document contains metadata that is useful for the browser, but invisible to users viewing the page.
It's pretty easy:
window.location = "http://www.google.com";
;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With