I have Ubuntu 15.04 and i am working on a project using bootstrap i have kept the files in "/var/www/html", none of my files are able to access the javascript files when the page is rendered from Localhost. But I have tried to render same file from a desktop or home the Javascript files work fine.
You Should open the .html files using from a server like if you are using apache you can use localhost/yourfilepath.html. Otherwise External JS files will not open.
Related
Having some problems here with a web application that was checked into a code repository.
Basically, this application in particular will not display any images, .js, or .css which are all located in the Content & Script folders. Only the raw HTML shows while running. This occurs specifically after doing a fresh pull from our code repository and running locally through Visual Studio. When you inspect the files in the console when its running, all the files are completely empty. The console is also giving a ERROR 500 error file not found (IIRC) The files are definitely in the project locally and they are showing in the Solution Explorer.
I am the only one who actively works on development for this application and I don't run into these problems with my machine. When you pull from the code repository on another computer, the problems start. However, no other applications with an extremely similar architecture have this problem after pulling fresh for the repository. I tried creating brand new web applications with exact same settings and files on the computers affected and they loaded perfectly.
The link to the file looks normal too, it matches with the production server which works.
The application is using bundles and most of the bundles look like this:
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.min.js",
"~/Scripts/bootstrap-datepicker.min.js",
"~/Scripts/bootstrap-timepicker.js",
"~/Scripts/bootstrap-confirmation.js",
"~/Scripts/respond.js",
"~/Scripts/bootstrap-select.min.js"));`
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.min.css",
"~/Content/bootstrap-datepicker.min.css",
"~/Content/bootstrap-timepicker.css",
"~/Content/bootstrap-sortable.css",
"~/Content/site.css",
"~/Content/bootstrap-select.min.css"));
Things I have tried:
Adding the .js and .css files in _Layout.cshtml page manually instead
of with bundle.
Replacing all the normal files with .min.js or .min.css and vice
versa
Changing authentication methods for access
Changing permissions on Content Folder
Recreating virtual directory
Using Visual Studio 2017 and 2019
I am stumped, anyone have any suggestions or recommendations? I can answer any questions that arise.
You'll need to commit/push .csproj file as well, this file has link to all your files in the project.
I have XAMPP and a separate cloud server. Inside XAMPP's htdocs there is a folder with a repository that I use to both develop, and push to the cloud server.
When using the same folder structure as the server ie. a script / js folder holding all the js files in the root of the folder (public_html/scripts) the server works fine.
The problem comes in development, where trying to access the scripts using src = "script/scriptname.js" gives me the error saying "Failed to load 404". Now I know it's just trying to search in localhost/scripts or htdocs/scripts rather than htdocs/projectname/scripts. I don't really want to have to move the script folder in and out all the time, as that's really tedious.
Is there any way to use a script folder without having to move it around in Xampp?
In my MVC5 web application I use two bundles for a page, one contains the common JavaScript files for all the pages and the other bundle is specific for the page. This works fine in development environment but the page specific bundle does not load in the staging. The Rendered script tags are as below.
<script src="/bundles/jsAll?v=72eJMPeVrT1mvbZw1VAU7y6r7vodOImt5NOMq4Gcp581"></script>
<script src="/bundles/my-page?v="></script>
Could not figure out why this happens...
The problem was locally this works because all the files are available, but did not work after deployment because the script file was not included to the project, hence the file does not get deployed to the destination. Since the file is missing the bundle has nothing to serve, so there won't be a version nor content.
So I am importing all of my website files onto my server and it is displaying the index.html as plain text and some basic images but no CSS or no JavaScript. I am running linux command line on putty connecting to my web server and I have no clue how to fix this, I have played and changed all permissions on the files also.
You have errors on your page for your JS and CSS file paths. Track down this issue.
I am planning to create a responsive website using jquery/backbonejs.
my plan is to create a simple webapp to be used in phonegap (and deployed to android and iPhone via appstore/Google Play) which does only check what resources are on the server (via JSON) and download them all. after downloading them, i would like to jump to the folder having all the downloaded files and start from there.
Since iam not allowed to download files directly into my phonegap app folder, i guess i need to download the files into some kind of document folder used by the app. But the question is, is it possible to redirect from my phonegaps index.html to that other index.html in my documents folder having all the downloaded files. would it work linking to jquery.js and images being in that folder located in js/ or img/ ?
That way i could keep my app up2date, but it loads only if there is something missing or updated on the server.