-2

I have 2 folders, folder phonegapapps which contains folder jqtest. My HTML file is in jqtest.

If file jquery-2.1.4.js is in folder jqtest with the following code, my page loads correctly:

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

If file jquery-2.1.4.js is in folder phonegapapps with the following code:

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

I get the following message: "Failed to load resource: the server responded with a status of 404 (Not Found) http://127.0.0.1:59223/jquery-2.1.4.js"

user3718259
  • 15
  • 1
  • 6

3 Answers3

0
<script type="text/javascript" src="/phonegapapps/jquery-2.1.4.js"></script> 
Andrew Evt
  • 3,613
  • 1
  • 19
  • 35
0

I now have it working with the relative path

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

by creating new folders (with the same structure!) and copying the files into those folders. Not really and explanation of the solution but it now seems to have worked. Thanks for the suggestions.

user3718259
  • 15
  • 1
  • 6
-1

Why don't you try to drag and drop the file from 'Solution Explorer' to your editor window in your IDE?

This would be a cake-walk if you are using Visual Studio.

Sachin Siwach
  • 90
  • 1
  • 10