I just found out this problem, it was because of <a herf=javascript:void(0)>!
I have the below jQuery code. It is used to get constants and display target video.
$(document).ready(function(){
$.ajax({
..
success:function(html){
$("#searchResultsVideoList").html(html);
}
});
$("[id^='http://gdata.youtube.com/feeds/api/videos/']").live("click",
function(){
presentVideo($(this).attr("id"));
}
);
function presentVideo(videoId) {
var params = 'operation=show_video&videoId=' + videoId;
var filePath = 'show.php';
$.ajax({
url:"cntl.php",
dataType:"html",
cache:false,
success:function(html){
$("#searchResultsVideoColumn").html(html);
},
error:function(XMLResponse){
alert(XMLResponse.responseText);
}
});
}
});
The problem is that the second $.ajax is basically copy from the first $.ajax,
but the second $.ajax always gets an error – and it alert nothing! If I replace the first $.ajax by the second $.ajax, it also works!
Maybe in the second $.ajax call you are not sending the params