Javascript: why I cannot load my external js page in Drupal ?
Posted
by Patrick
on Stack Overflow
See other posts from Stack Overflow
or by Patrick
Published on 2010-05-15T15:24:03Z
Indexed on
2010/05/15
15:34 UTC
Read the original article
Hit count: 174
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
© Stack Overflow or respective owner