Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access Denied error while opening file in JavaScript

When I try to open window.open('file///C:\calendar.html') it throws

Access Denied error

How do I fix this? Thanks

like image 335
Silas Njoroge Avatar asked Feb 26 '23 18:02

Silas Njoroge


1 Answers

Usually you'll won't be allowed to open files from the client's filesystem as this would pose a huge security hole. No browsers would allow it.

You could use signed scripts to do that. For a detailed description check: http://www.mozilla.org/projects/security/components/signed-scripts.html This is of course browser specific.

like image 163
Ioan Alexandru Cucu Avatar answered Feb 28 '23 07:02

Ioan Alexandru Cucu