AndyMM
AndyMM

Reputation: 910

dom not loading when referencing an external js file

I am referencing the jQuery library, in a master page like so:

<script type ="text/javascript" src ="../../Scripts/jquery-1.4.1.js" />

The page loads and I am presented with a blank screen. If I take a look at the source the hmtl code is present, but the browser is simply not displaying any of the elements.

I have tried co-locating the master and the js fail to no avail.

Opening the FF with firebug I get the following error :

Failed to load source for: http://localhost:50417/Scripts/jquery-1.4.1.js , yet navigating to this url I am able to load the js.

Any help would be appreciated.

Upvotes: 2

Views: 245

Answers (1)

jAndy
jAndy

Reputation: 236122

It's not valid to use the /> shortcut for script tags. It must look like

<script type ="text/javascript" src ="../../Scripts/jquery-1.4.1.js"></script>

Upvotes: 3

Related Questions