javascript - jquery load do not answer on call via load -
i have seen voting system on http://htmlinspiration.com/ (click in heard)
they use:
$(".vote").click(function() { $(this).load($(this).attr('href')); console.log("voted"); return false; });
with html:
<aside> <a onclick="return false" class="vote" href="http://www.dasunddas/vote.php">10</a> </aside>
i tried too. without success. php file is:
<?php header('content-type: text/html; charset=iso-8859-1'); echo "100"; ?>
i not answer load. if call php-file direct answers 100.
what's wrong?
here in addition jsfiddle: http://jsfiddle.net/u6khs/4/
i don't problem when visit jsfiddle found following error
access-control-allow-origin
to solve error need follow answer of xmlhttprequest error: origin null not allowed access-control-allow-origin
hope solve problem
Comments
Post a Comment