I'm taking a programming class on Lynda.com and I just finished creating this HTML web page, but it's not opening on a web browser. Can someone help me figure out what I did wrong? Thanks! :)
Here's what I did:
Picture
I took a look at your code and it not only looks correct, it displays for me on Chrome, Firefox, Opera, and MS Edge.
I'm thinking that it may be the manner in which you are trying to access the file to display.
Follow these two solutions and see if one of them works for you:
Solution 1) Find where on your hard drive you are saving your "body.html" file. When you find the file, click on it and it should automatically open the file in whatever your default browser is for you.
Solution 2) If you are trying to manually type in the directory address for your "body.html" file inside the web address box of your browser, make sure you are writing the address correctly. Remember, the address is coming from your hard drive and not the internet itself. A format would look something like this:
C:/Website-Projects/body.html
or try:
C://Website-Projects/body.html (***the only difference is the 2 back slashes instead of one).
in the example above, "C" stands for the designation of my hard drive, "Website-Projects" is the name of the folder on my "C drive" that my target file is in, and "body.html" is the target file I'm trying to open within the "Website-Projects" folder.
Give those two solutions a spin and see if that helps.
Related
just starting HTML and I'm at the point of learning . I know that if I put the "index.html" and the img in the same directory, It should be fine to just address the img by name as in ". But when I open the page, all I see is a cracked image. When I look the preview of the page in my file explorer, it just says that "some images where blocked to avoid the sender identifies your computer. Open this item to exibit the images". WHen I try to just source with an URL, it shows up fine, no problems at all, I've tried using alt and not, other browsers as well.
I tried renaming the img file to something simpler to simplify not mistaking the name, tried putting the img and the project (index) file in another directory together, and I was hoping to understand why this which sounds so simple is getting me so many errors.
After searching a bit I came across this hope it helps :)
"Well I think I've fixed it. In control panel>windows defender>options>real-time protection then uncheck scan downloaded files and attachments. After I did this, I could see images on my system use while creating an html page."
link to refer:https://answers.microsoft.com/en-us/windows/forum/all/some-pictures-have-been-blocked-to-helpactually/2aa402d3-0404-44d9-83ce-960258979c07
so, i've ben hunting for the answer, and seems like i can't get this to work, i wanted to make so that, i have a browser page already made in html, and when i click a link in there, it opens a chosen folder on the computer, but i don't want it to open on just this computer's path, I wanted to open a folder that is inside the main folder, so that anyone that has the same files as I do, can open it, i tried < a href="File_path">, tried putting < a href="file:///(file path)">, tried like i have in excel ../../'file path', and can't see where is the problem, anyone can help?
Here you need to use a "file" protocol to link a file in the HTML like,
Link
The browser may or may not open the file due to the security setting. You can click the right button and choose "copy link address" and then paste it into the browser.
There are security implications of showing a local file/folder from an website. It may work when the page is held locally but when on a server it will be failing. However definitely not any chosen folder anywhere in your PC.
If you require to achieve such you need custom implementation using a programming language like ASP .NET like shown in this example.
https://stackoverflow.com/a/6047826/684030
You haven't mention much details on what web server you are using. But if it's IIS (Windows) you may consider allowing directory browsing which may allow to show a sub directory under your website.
I'm currently "learning" d3js by myself and I found a lot of examples here. It seems that for all the visualizations we need two separated files. One is a script (an html file) and the other one is a json file which contains our data set.
I'm curious if there is a way to put the json file into html file so we can have only one file. I think I saw an example like this previously on the internet but I lost it.
The only reason I want to do it like this is that if data set is separated from html file, I cannot use Chrome to view my result (I think Chrome is blocking the script from reading local data set). I can use Firefox to open up my result but the animation doesn't perform smoothly.
Maybe some of my understanding is not really right. But if there is any suggestions please let me know. Thanks in advance.
If you're just using one HTML file, you probably have a <script> tag on your page where all the code is located. You can define your data as a Javascript array.
It can be nice to use multiple files to organize code, data, and view elements (the HTML). This page gives some help on setting your browser to let you do that. For Chrome, close all open windows. Then run Chrome from the 'Run' prompt with this flag: chrome --allow-file-access-from-files
I want to put a link on html which downloads a file with different filename from original. So for example there is this PNG file:
https://www.google.com/images/srpr/logo11w.png
I would like to put it into html so that when you click to download it, it saves not as "logo11w.png" (which is the original name) but as another name, for example: "Google Logo.png"
I actually had saved the code to do this on my computer and now i have lost access to it and can't seem to find it on google, i tried several search queries. However, I remember it was a pretty short html code (1 line) however I just want to make this possible no matter if you guys give me another code, all that matters is that it works. Thanks!
Faced the same problem today and stumbled upon your question. Here's what I found:
Download logo
You can also achieve the same through javascript, here's the link:
http://www.w3schools.com/jsref/prop_anchor_download.asp
I am currently building an asp intranet site.
There are various helpful links that I need to include and some of them happen to be .xls files that are located on a local network within the company.
I link these documents just like I would any word docs (which work fine by the way).
<span>Schedule</span>
The link above works if I simply copy and paste the raw address into my browser (a pop-up window comes up asking me to open the file in Excel). But when I make this a link on the intranet site and try to click on it, nothing happens. I can see the link when I hover over it on the status bar but that's it. It is non-clickable. Anyone have any idea what is causing this and how to fix it?
I should mention that two of these .xls files are password-protected but one of them is simply a read-only file which can be opened by anyone.
I am 100% sure this has nothing to do with css styling because the same thing happens in the current (old) intranet site made by someone else and I use these links on different menu bars as well.
I think you use wrong syntax for shared files, try this:
file:///P:\-Projects-\SCHEDULE.xls
Backslashes are still valid for the path part. Moreover, I'm not sure whether Sharepoint may recognize correctly path to most likely network drive P:.
For me such link to local share works:
file:///\\fs-1\Install\Windows\Servers\DB\MSSQL\SQL2005\en_sql_server_2005_service_pack_4_x64.exe
The solution to this problem is to add the site to the "Trusted Sites" list.
Opening intranet files without the user knowing is considered a secruity threat.
In IE go to Internet Options -> Security -> Trusted Sites then add the site.
http://answers.microsoft.com/en-us/ie/forum/ie9-windows_7/after-latest-update-ie-wont-open-network-file/172e4ac3-1c1f-4948-8a3f-c8c344eae06d