jQuery Ajax call not working in Chrome Browser.
my code :-
function memories(pageName)
{
$.ajax({
type: "POST",
url: pageName,
success: function(html){
$("#page").load(pageName);
}
});
}
You're calling load, but not passing in a URL. load is for loading content from a URL and then applying it to an element. You either want to use it without ajax, or you want html.
E.g., either:
function memories(pageName)
{
$("#page").load(pageName);
}
or (more likely, as you've used POST, although as you haven't supplied any params it's not clear):
function memories(pageName)
{
$.ajax({
type: "POST",
url: pageName,
success: function(html){
$("#page").html(html);
}
});
}
You are using load() where you should be using html() to set the contents of an element:
function memories(pageName)
{
$.ajax({
type: "POST",
url: pageName,
success: function(html){
$("#page").html(html);
}
});
}