Friday, 15 July 2011

javascript - is NOT loading from HTML file but @import for css file is -



javascript - <script src="js/jquery/jquery.js"></script> is NOT loading from HTML file but @import for css file is -

so here have basic html file using ubuntu on vmware fusion vm on macbook pro.

here's basic file:

<!doctype html> <html> <head> <title>todo supply title</title> <script type="text/javascript" src="js/jquery/jquery-1.11.1.js"></script> <script type="text/javascript" src="js/test.js"></script> <link rel="stylesheet" href="css/import.css" media="all" /> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <div>hello world</div> </body> </html>

ok, i've been developing on 20 years , i've started using next job i'm at:

mac osx vmware fusion on mac ubuntu (1st time ever using , love it redis server (ah, not much) node.js grunt karma

and list goes on...

my path /home/myusername/inetpub/wwwroot/myprojectdir/

my server url simply: localhost in browser i'm using netbeans 8.0

when run file, above, console log shows css files have loaded nicely, but, , strange; js files not load @ all.

this unusual part:

when simple css load this:

<link rel="stylesheet" href="css/import.css" media="all" />

the import.css file this:

@import "style.css"

that works, but; when seek load style.css file normal way, this;

<link rel="stylesheet" href="css/style.css" media="all" />

i page 404 error not found.

i've tried preloading javascript files @import css no avail.

this mind-boggling.

so in summary:

this works:

<!doctype html> <html> <head> <title>todo supply title</title> <script type="text/javascript" src="js/jquery/jquery-1.11.1.js"></script> <--- not work <script type="text/javascript" src="js/test.js"></script> <--- not work <link rel="stylesheet" href="css/import.css" media="all" /> <--- works long utilize @import within import.css file. <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <div>hello world</div> </body> </html>

but not:

<!doctype html> <html> <head> <title>todo supply title</title> <script type="text/javascript" src="js/jquery/jquery-1.11.1.js"></script> <--- not work <script type="text/javascript" src="js/test.js"></script> <--- not work <link rel="stylesheet" href="css/style.css" media="all" /> <--- not work <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <div>hello world</div> </body> </html>

what's problem here??? please help!

update:

here's screenshot of console log.... @ way css files loaded , not js files.... remember, i'm on ubuntu 14.01 lts on vm through mac book pro osx 10.94

javascript html ubuntu

No comments:

Post a Comment