I've been learning AJAX for the past hour or so, trying to get this code to work but it doesn't seem to want to know.
<script type="text/javascript">
$('a.fire').click(call_ajax);
function call_ajax() {
$.ajax({
type: "GET",
url: "http://127.0.0.1/onlineshop/admin/scripts/test.php",
dataType: "html",
success: function(html){
$("#holder").append(html);
}
});
}
</script>
Other methods I have tried seem to call the ajax function I create before the anchor is clicked (All the ajax must be working as it would load before I wanted it to!)
I have put an alert just at the start of the function, and it is calling it, just my ajax section isn't working correctly, or at least not returning anything.

New Topic/Question
Reply



MultiQuote



|