I want to pass a variable to a php file using load. based on this post, I tried that :
$( document ).ready(function() {
$("#div2").load('loadTable.php',{
'videoId': <?php echo $video_id ?>
} );
$("#div3").load("multiTimeline.php?videoid="+videoId+"");
});
It works perfectly fine like that(EDIT) :
$( document ).ready(function() {
$("#div2").load('loadTable.php');
});
In the debugger I can see that it doesn't even open the loadTable.php. Does anybody see what I'm doing wrong?
Thanks in advance for help.
$( document ).ready(function() {? Because in your sample it insn't closed and the code is correct so if it isn't working it may be because of one simple detail$video_idbeing declared in the first example? Ass the php code to your question please