Discussions

Expand all | Collapse all

Javascript to open a folder on local computer

  • 1.  Javascript to open a folder on local computer

    Posted 08-10-2017 18:59
    I currently use formula-text buttons with Javascript to open remote URLs. This works great. But I also want to use the same technique to open a folder my local Mac (so I can save files).  In Mac, you can use a link from the finder (file:///Users/drivename/folder/folder...) format to get to files NP. But unfortunately dropping this link into the formula text field or a URL doesn't work I'd think some javascript might be needed to advance this functionality?  
    If the link above is listed and you right-click on it then choose "services" and the choose "Open URL" it does work..but that's too many keystrokes...can anybody help?


  • 2.  RE: Javascript to open a folder on local computer

    Bronze
    Contributor
    Posted 08-11-2017 13:15
    what is your javascript? have you tried window.open() ?


  • 3.  RE: Javascript to open a folder on local computer

    Posted 08-11-2017 22:55
    "<a class='Vibrant Success' onclick=\"var a=window.open('"&ToText([Link])&"', 'newwindow','width=1200,height=900');\" >Open</a>"


  • 4.  RE: Javascript to open a folder on local computer

    Bronze
    Contributor
    Posted 08-12-2017 02:12
    what happens when you try this? any error messages in the console?


  • 5.  RE: Javascript to open a folder on local computer

    Posted 08-14-2017 12:33
    I'm not super-well versed in Console, but not that I can see. If I open the debugger in Safari it says there is an error loading the resource. 

    If I right-click on the URL displayed in Quickbase and use the service "Open URL" Safari does open the Finder and works fine.  


  • 6.  RE: Javascript to open a folder on local computer

    Bronze
    Contributor
    Posted 08-14-2017 12:46
    You could just mention in the help text of that field to "Right click>Open URL" . would you and your users be able to live with that?