Problems using JQuery resources 1.10.4 - javascript

I am using google drive to host the following website:
https://e8edf64c16f714a3eb501e781f477ae636ff655a.googledrive.com/host/0B-CU-bHZqNGdeWd1RTlZd0xGUFU
I have the following code in my index.html file:
<!-- These are my resources -->
<link rel="stylesheet" href="resources/jquery-ui-1.10.4.custom/css/ui-lightness/jquery-ui-1.10.4.custom.css"/>
<script src="resources/jquery-2.0.2.js"></script>
<script src="resources/jquery-ui-1.10.4.custom/js/jquery-ui-1.10.4.custom.js"></script>
<script src="resources/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.draggable.js"></script>
But i am getting this console error
Failed to load resource: net::ERR_NAME_NOT_RESOLVED
I am not sure what is going on here, this use to work just fine.

Related

Why is bootstrap source maps not loading on website

I have a index.html that is served by a node.js server, unfortunately I am having trouble loading bootstrap when I use my local downloaded bootstrap library; when I use bootstrap served from the web it works fine.
Website works when bootstrap included like this
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
Website doesn't work when bootstrap included like this
<link rel="stylesheet" type="text/css" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
<link type="text/json" href="node_modules/bootstrap/dist/css/bootstrap.min.css.map">
<script type="text/javascript" src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<link type="text/json" href="node_modules/bootstrap/dist/js/bootstrap.min.js.map">
When I look at the node server logs, I see that the source map is failing to be served to the client.
/node_modules/bootstrap/dist/js/bootstrap.min.js.map
_http_outgoing.js:464
throw err;
^
TypeError [ERR_HTTP_INVALID_HEADER_VALUE]: Invalid value "undefined" for header "Content-type"
at ServerResponse.setHeader (_http_outgoing.js:473:3)
at C:\Users\Dwight\work\trainingwebsite/Server.js:109:20
at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
I've tried using bootstrap 4.0.0 and 4.4.1 but both exhibit the same behaviour.
Why is this happening only when I use my local bootstrap? I've tried setting different types for the source map include but I keep getting the same error...
Update:
When I disable source maps on google chrome settings, the site loads fine with local bootstrap.
Try changing it to:
<link rel="stylesheet" type="text/css" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css.map">
<script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<script href="node_modules/bootstrap/dist/js/bootstrap.min.js.map">

How to load local JavaScript libraries in Github Pages?

I recently deployed my website to GitHub Pages - https://max-stevenson.github.io/my-year-in-books/
I have a two local JavaScript libraries (jQuery and swiped-events) downloaded and within the following directory: src/public/js/lib.
In my index.html file at the root directory, I am linking to the two libraries like so:
<script type="text/javascript" src="/src/public/js/lib/jquery-3.4.1.min.js"></script>
<script src="/src/public/js/lib/swiped-events.js"></script>
But when I access the page on GitHub Pages I get the following errors:
GET https://max-stevenson.github.io/src/public/js/lib/jquery-3.4.1.min.js net::ERR_ABORTED 404 (Not Found)
GET https://max-stevenson.github.io/src/public/js/lib/swiped-events.js net::ERR_ABORTED 404 (Not Found)
When I run a local instance on my machine via a node express server and visit the site at localhost:3000, everything works great.
Can anyone please advise me where I'm going wrong and how to correctly reference my scripts so that they are loaded in GitHub Pages?
Try:
<script type="text/javascript" src="/my-year-in-books/scr/js/lib/jquery-3.4.1.min.js"></script
Or:
<script type="text/javascript" src="./scr/public/js/lib/jquery-3.4.1.min.js"></script

Uncaught ReferenceError: firebaseui is not defined

The website does not display anything. It gives the error: firebaseui not defined.
I am running my code in eclipse, on my localhost web server. The error is displayed in "app.js" file of a sample web application I took from github. The output must show sign-in widgets.
var ui = new firebaseui.auth.AuthUI(firebase.auth());
Add this into the HTML page's <head>, because firebaseui.js defines the missing firebaseui:
<script src="https://cdn.firebase.com/libs/firebaseui/3.5.2/firebaseui.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.firebase.com/libs/firebaseui/3.5.2/firebaseui.css" />
This must be loaded before the app.js is being loaded, so the it won't be undefined anymore.

Javascript works on localhost but not on live server

The Javascript works on localhost but not the live server, and I can't figure out how to address the path.
Head section:
<script type="text/javascript" src='js/modernizr.min.js'></script>
At the bottom:
<script type="text/javascript" src='js/jquery.min.js'></script>
<script type="text/javascript" src='js/script.js'></script>
On live server the console shows these errors:
Failed to load resource: the server responded with a status of 404
(Not Found) - /js/isotope.min.js (and similar 17 times)
Content pages are not able to reference the functions in any of the .js files, the browser is looking for a separate file instead reading it from the script.js. What did I do wrong?

Deploy angular (hottowel) app in apache httpd

I've generated a project with john papas hottowel.
gulp serve-build
is working.
When I drop the build folder to my apache server the app is not working. It's not finding the files, although they are there.
localhost/:15 GET http://localhost/styles/lib-7947d5e2c5.css
localhost/:17 GET http://localhost/styles/app-ba4747fbb6.css
localhost/:34 GET http://localhost/js/lib-e827a87368.js
localhost/:36 GET http://localhost/js/app-9e5293691e.js 404 (Not Found)
The index.html is found.
<head>
...
<link rel="stylesheet" href="styles/lib-7947d5e2c5.css">
<link rel="stylesheet" href="styles/app-ba4747fbb6.css">
</head>
<body>
...
<script src="js/lib-e827a87368.js"></script>
<script src="js/app-9e5293691e.js"></script>
</body>
What can be wrong?
You will need to turn off HTML5 Mode and change base URL.
Turn off HTML5 mode in app/blocks/router-helper.provider.js.
Line 18: $locationProvider.html5Mode(false);
Comment out base in index.html
Line 17: <base href="/">
By doing this your web app will route to a 404 by default. To fix this you can change the core route to / instead of /404 within app/core/core.route.js
By doing this you will get a #/ within your URL.

Categories

Resources