Forum Discussion

StephenStephen's avatar
StephenStephen
Qrew Assistant Captain
8 years ago

Javascript to open a folder on local computer

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?
  • StephenStephen's avatar
    StephenStephen
    Qrew Assistant Captain
    "<a class='Vibrant Success' onclick=\"var a=window.open('"&ToText([Link])&"', 'newwindow','width=1200,height=900');\" >Open</a>"
    • ChuckGrigsby's avatar
      ChuckGrigsby
      Qrew Cadet
      what happens when you try this? any error messages in the console?
    • StephenStephen's avatar
      StephenStephen
      Qrew Assistant Captain
      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.  
    • ChuckGrigsby's avatar
      ChuckGrigsby
      Qrew Cadet
      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?