Javascript: why I cannot load my external js page in Drupal ?
- by Patrick
hi,
when I add the tag script to load an external javascript file, my page is not longer displayed.
There are not error in Firebug, there are not errors such as "File not found" or "Not enough permissions", the browser just displays a blank page for some reason.
<?php print $head; ?>
<?php print $styles; ?>
<?php print $scripts; ?>
<script type="text/JavaScript" src="main.js" />
If I remove the last line everything works perfectly.
The previous php lines are the standard Drupal head lines.
This is the content of my js file:
$(document).ready( function() {
alert("hello");
});
thanks