Hi,
Is there a way to have an hyperlink in an HTML document and possibly Javascript function that when clicked opens a file using the OS X default application or a folder in Finder. For instance: Clicking a link that would cause a text file to open TextWrangler, or clicking a link to a path that opens a Finder window at that location.
I tried these but they don't work:
The first two open the text file in the browser window and the third produces an error page in the browser.
As for opening a folder:
This correctly opens the Finder window in Safari (cool), but Chrome and Firefox just display a directory listing in the browser window.
I realize this is probably based on security reasons for browsers and OS's and so it's probably wouldn't be a straightforward process, but it's for an internal/local page for my personal use, so if it involved third-party software or browser extensions that would be fine with me.
I googled this but it's hard to find info about it because the search terms end up together a lot in articles that are unrelated to my issue. Thanks for any help you can give.
Is there a way to have an hyperlink in an HTML document and possibly Javascript function that when clicked opens a file using the OS X default application or a folder in Finder. For instance: Clicking a link that would cause a text file to open TextWrangler, or clicking a link to a path that opens a Finder window at that location.
I tried these but they don't work:
Code:
<a href="/Users/mike/Desktop/test.txt">test</a>
<a href="file://localhost/Users/mike/Desktop/test.txt">test</a>
<a href="Macintosh HD:Users:mike:Desktop:test.txt">test</a>
The first two open the text file in the browser window and the third produces an error page in the browser.
As for opening a folder:
Code:
<a href="/Users/mike/Desktop/">test folder</a>
This correctly opens the Finder window in Safari (cool), but Chrome and Firefox just display a directory listing in the browser window.
I realize this is probably based on security reasons for browsers and OS's and so it's probably wouldn't be a straightforward process, but it's for an internal/local page for my personal use, so if it involved third-party software or browser extensions that would be fine with me.
I googled this but it's hard to find info about it because the search terms end up together a lot in articles that are unrelated to my issue. Thanks for any help you can give.