How to open a generic file (Word, Excel, PDF, txt, or ?) from a network drive using Windows?
I had assumed that an html file with the following content would have solved the issue for a Word file:
<script type="text/javascript" language="javascript">
let q = "\\serverName\PathToFile\NewestFile.docx"
window.open("ms-word:ofe|u|"q)
</script>
Basic idea is to link create a link to the latest file, that then can be refered as a link, that do not change despite the file versions change. url to file works, but is extracted (link inside file is taken), when applying this in a mail in Outlook :-(
Any great ideas?
Related
Reaching out to see if any ADA compliance experts might know how I might resolve an ADA compliance issue pertaining to our video transactions. We essentially provide links to .txt files for all of our videos which contain the video transcription. But when running an ADA scan we receive 2 errors pertaining to our transcriptions.
"Language missing or invalid "
"Missing or uninformative page title"
I'm not sure how I would tell a screen reader or ADA scanner the language or a page title given that these are just plain txt files. Any assistance would be greatly appreciated. Thanks.
This might be more about how your browser is set up to handle .txt files. Is your default action to download the file or to view it in the browser?
If the file is downloaded, then it's up to the end user to display the .txt file in whatever program they have set up to view them.
If you're letting the browser display the page, then that page is generated by the browser and I'm not sure if you can customize the page that's generated. I tried Firefox, Chrome, and Edge and they all generated a similar template to view a text file. (Edge uses the chromium engine so it's not surprising that Edge and Chrome have the same template). There's just a minor difference in the <head> between Firefox and Chrome.
This is essentially what's generated:
<html>
<head>
<!-- if using firefox -->
<link rel="stylesheet" href="resource://content-accessible/plaintext.css">
<!-- if using chrome/edge -->
<meta name="color-scheme" content="light dark">
</head>
<body>
<pre>
(contents of text file)
</pre>
</body>
</html>
If you run an accessibility scanner on this generated page, you will indeed get the two errors you mentioned.
3.1.1 Language of Page
2.4.2 Page Titled
For the language, that's specified on the <html> element with the lang attribute. If you bring up the code inspector on this stackoverflow page, you'll see lang="en":
<html class="html__responsive " lang="en">
For the page title, that's specified in the <head> with a child element of <title>. You can also see that in the stackoverflow page:
<head>
<title>wcag - ADA Compliance Language Missing or Invalid for video transcription txt files - Stack Overflow</title>
...
</head>
If no page title is specified, the browser usually shows the URL or just the filename as the title.
So, can you do anything about the template? I'm not sure. That would be an interesting project.
An alternative is to have your own webpage display the text file, which you would obviously have complete control over and could specify the language and the page title. But I would make this a lower priority issue over other accessibility issues that your website might have.
I have downloaded the p5js file on my windows computer but can't find a way to install it
Have you installed p5js on your pc if yes then please help me
It's a zip file so I extracted it using Winrar but in the extracted files there is one called MacOSX and i suppose that's for mac users even though I clicked on download for Windows button on the official website
p5js does not require an install. The javascript libraries can be downloaded and accessed locally or can be pulled in from a CDN.
The question mentions the MacOSX folder that is included with the source. You can ignore or even delete this folder. The MacOSX folder contains a _DS_Store file which helps Mac operating systems know how to display folder contents. See the DS_Store wiki article for more info.
p5js get-started has a nice introduction and some minimal examples.
function setup() {
}
function draw() {
ellipse(50, 50, 80, 80);
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/p5.min.js"></script>
If you downloaded a copy of p5.js the complete HTML of the example could look like this
<html>
<body>
<script src='p5.js'></script>
<script>
function setup(){}
function draw(){
ellipse(50,50,80,80);
}
</script>
</body>
</html>
A sketch like the one above can be simply saved with an html extension in the same folder as the p5.js file and opened with a web browser.
One thing to note is that as you write more complex sketches that require resources such as images or data files you may need to host your projects on a server. This is also very simple to do. Get more information on simple web servers here: local-server
In order to use P5js include CDN
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.2/p5.js">
</script>
</head>
<body>
</body>
</html>
As others have said, p5.js is a JavaScript library, so you don't really have to install anything for it to work.
If you're looking for a p5.js editor, I recommend using the p5.js web editor which handles everything for you.
Shameless self-promotion: here is a tutorial on using p5.js in various editors, and here is a tutorial on including the script in an HTML file.
We don’t need to install anything, just use the CDN…
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.2/p5.js"></script>
You don't need to install anything, as you can use the web editor or you can install the processing editor and add p5.js mode, and it will conveniently set up everything for you.
My recommendation is to use an IDE with P5.JS
https://code.visualstudio.com/
after that install the extension
and then create a folder and name it what ever you want
then hit CTRL SHIFT P and type
"Create p5.js Project"
then select your folder and click on
Sketch.js
I downloaded a custom build for CKEditor open source from the website and followed the documentation to set it up. I put the following in my header.html file which is included in EVERY file:
<script src="./includes/ckeditor/ckeditor.js"></script>
<script>
window.onload = function() {
CKEDITOR.replaceAll();
};
</script>
I was under the impression that this would load the script and then replace all <textarea> fields in forms with the editor but i'm just getting basic editors as default with textarea's. Any idea? All files were uploaded to the root/includes/ckeditor directory when unzipped.
Turns out it was an apache permissions issue. Problem solved.
I'm having trouble figuring out why when I create a new MVC 3 application the jQuery intellisence is not working until I alter the script tag in my _Layout page. According to a tutorial I watched, as long as I placed the vsdoc file in my scripts folder, I should have jQuery intellisense but that is not the case, at least thats not happening for me. After creating a new project, here is what the script tag looks like in my _Layout.cshtml page:
<script src="#Url.Content("~/Scripts/jquery-1.7.2.min.js")" type="text/javascript"></script>
I have included the vsdoc file in my Scripts folder but I do not have jQuery intellisense. If I do a view sorce on the page here is what I see:
<script src="/Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
It doesn't look as if the path is correctly resolved.
So I then delete this tag and replace it by dragging and dropping the file to the page and end up with this:
<script src="../../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
Now I get jQuery intellisense. So why do I have to make these changes befeore I get intellisense? Is this something that others have experienced or am I possibly doing something wrong? It seems like the #Url.Content functionality is broke and leads me to wonder if maybe I will have problems with it for other uses like placing images on a form.
As far as I am aware, your vsdoc.js script cannot just exist in the scripts folder. It has to be referenced in every view that will use it.
You should reference it like this:
#if (false) {
<script src="../../Scripts/jquery-1.5.1-vsdoc.js" type="text/javascript"></script>
}
Note: Check the version of the file that you reference is correct.
The if statement will prevent the browser from actually downloading the file.
I was using the SCM music player for my tumblr page and a couple of other pages on the internet. But the SCM website went down. I found the player source files and loaded them onto my server. The script works fine on the website that the files are hosted on, but when I try to use the script on web pages that aren't on my server it seems that it just won't work.
I tried looking in the script file to see if there was something I could fix, but no luck. Is there something wrong with the code below?
<script type="text/javascript" src="http://www.itsnotch.com/tumblr/SCMmusic/script.php" ><!--
//--></script>
<script type="text/javascript"><!--
SCMMusicPlayer.init("{'skin':'http://itsnotch.com/tumblr/SCMmusic/skins/cyber/skin.css','playback':{'autostart':'true','shuffle':'true','volume':'50'},'playlist':[{'title':'Dam-Funk','url':'http://itsnotch.com/music/10_west.mp3'}],'placement':'bottom','showplaylist':'false'}");
//--></script>
I figured it out. For anybody who would still like to use the SCM music player.
You will have to download the files from a site (forgot which one, just google it). Then you'll have edit the script.php file.
There a line of code that reads like this.
"this.url =" and then a php method follows it. Erase the and everything between it and replace it with the actual container.php url path.
ANd it should work