<html>
<head>
<script src="javascript.js" type="text/javascript"></script>
<script type="text/javascript">
var myFile = 'myfile.php?sid=' + "<?php echo session_id() ?>";
$('#stuff').fadeOut("fast").load(myFile).fadeIn("fast");
</script>
The order of inclusion is somewhat dependent on what is inside javascript.js. If you use the declared variable myFile inside, first declare it. If it's just lib, for example. jQuery, declare it later.
source
share