jQuery ajax doesn't work on url without www
Posted
by steamboy
on Stack Overflow
See other posts from Stack Overflow
or by steamboy
Published on 2010-03-31T18:43:00Z
Indexed on
2010/03/31
18:53 UTC
Read the original article
Hit count: 599
The jQuery ajax script below doesn't work on my site if url
is without www. I checked Firebug and it doesn't send the ajax call.
$.ajax(
{
type: "POST",
url: "http://www.mysite.com/beta/products.php",
data: "page_type=index&sort=relevancerank&CartId=<?php echo $CartId;?>&HMAC=<?php echo $HMAC;?>",
success: function(msg)
{
$('#content-holder').html(msg);
},
error: function()
{
alert("An error occurred while updating. Try again in a while");
}
});
© Stack Overflow or respective owner