Ajax php file call fails
I had this script working, to replace a target element in the DOM with the content of "sample.html" file:
$('.ajaxtrigger').click(function(){
$('#loading').show();
$('#target').load('sample.html', func开发者_如何学运维tion() {
$('#loading').hide();
});
After that, I needed to transform sample.html in sample.php because I must call some functions in it. The above script doesn't work now, if a simply replace 'sampe.html' with 'sample.php'..
Ajax doesn't call its content anymore
Have you tried visiting the 'sample.php' page individually? Perhaps you have a syntax error or something more sinister like PHP is not working/installed on your server.
精彩评论