To make things simple, here is an example.
alert("<?php echo $post_id ?>");
<? } ?>
The reason is because im using a .load function and this stops the script from executing.