I have a webpage divided on subdomains by an .HTACCESS simple rule. Subdomains contains an user's profile, and it has a comment form, which points to the main domain to make the POST request:
function comment(){
if($('#comment').val() && $('#comment-author').val() && $('#comment-mail').val() && $('#comment-tc').is(':checked')){
$.post('http://www.example.com/user-profile/ajax.php', {'fnc':'make-comment', 'text': $('#comment').val(), 'mail': $('#comment-mail').val(), 'name': $('#comment-author').val()},
function(d){$('#comment-area').html('Your comment was sent! Thanks '+$('#comment-author').val()+'!');});
}
}
It works right if I do this on the main domain, but if I try it from a subdomain, for example ryanc.domain.com
, Firebug throws an 200 OK, but at the same time an error:
It doesn't have response nor effect, and I need this to work. I don't know why this is not working, any clue?