jquery ajax call fails
$('.deleteBtn').click(function(){
$('#videofrm').load('edit.php?url='+encodeURI($(this).siblings('a').attr('href'))+'&ac开发者_高级运维tion=delete');
})
edit php code is:
if($_GET['action']=='delete'){
echo "<p>daniel</p>";
}
why is this not working???
First of all try to find out if the URL is right by placing this code right after the first line:
alert('edit.php?url='+encodeURI($(this).sublings('a').attr('href'))+'&action=delete');
If that's correct, find out if the load function is being executed properly:
$('#videofrm').load(url, function() {
alert('url loaded');
});
I guess one of these will fail.. otherwise it should be working ;-)
======================
What happens if you use:
$('#videofrm').load('test.html');
and test.html only contains <p>test</p>
精彩评论