This question already has answers here:
Need to drag and drop a file in html [closed]
(2 answers)
Closed 10 years ago.
Im using Jquery ui. I want to drop a external file in a dropzone and get just the path of the file. I think i have to overwrite the default function window.drop. But im not sure how to do it or what to write instead ?
You can't get the local file path in JavaScript, for security reasons.
Related
This question already has answers here:
jQuery how to load some json records into a form fields?
(4 answers)
Loading local JSON file
(26 answers)
Closed 4 years ago.
I have 3 files: formData.json, myForm.html, and form.js.
How can I take data from .json using JavaScript, and load it to my HTML form without any kind of server, just using Chrome? Is it even possible? Thanks.
Yes, it is possible, but probably requires an entire tutorial rather than a simple answer, and many choices to be made depending on your requirements and experience.
See if this other answer helps.
This question already has answers here:
How to prevent your JavaScript code from being stolen, copied, and viewed? [closed]
(10 answers)
Closed 5 years ago.
I have inserted my javascripts in the header.php file, but I noticed the whole code can be stolen by simply lookin at the source from within any single post or homepage...
May you suggest me a simple way to hide my javascripts in wordpress somehow to prevent being copied/stolen?
You can't hide javascript. Client always need to access it.
You can minify and uglyfy your code, so it will be hard to read it
This question already has answers here:
How to force browsers to reload cached CSS and JS files?
(57 answers)
Closed 7 years ago.
I'm doing changes in JavaScript file every time. I need to clear the browser history to reflects the changes in JavaScript file is there any solution for this problem.
Try this.Just append some random value
<script type='text/javascript' src='main.js?version=RANDOM VALUE'></script>
This question already has answers here:
In Firefox, Write to a File using Javascript?
(4 answers)
Closed 7 years ago.
May I ask, is it possible to write local file via javascript using firefox.
Something like ActiveXObject("Scripting.FileSystemObject") in IE.
Thank you very much
Easy way is to send the file to Firefox as a download. So user can choose where to store this file.
Navigators can not act directly on local file system because of security implications!
This question already has answers here:
How might I get the script filename from within that script?
(12 answers)
Closed 8 years ago.
Is there any way to get its filename by only using javascript?
For example
I want to get the string somefile.js?v=32&b=2.2 inside that same javascript file.
Is it possible to get it without going through the script tag?
Filename using only for loading script text. After that this script text puts in javascript tag and executes.