2 Replies Latest reply on Aug 16, 2011 1:28 AM by Dave Merchant

    Hyperlink Defaults if No Internet Access

    CharityRae1981

      Is it possible to have a hyperlink act with an "if then" statement? Meaning if the hyperlink goes to a web-page and the user does not have Internet access, could the hyperlink then default to a PDF?

        • 1. Re: Hyperlink Defaults if No Internet Access
          try67 MVP & Adobe Community Professional

          This could possibly be achieved with a script.

          The problematic part is identifying whether the user has internet access or not...

          One possible way of doing that is to try to open a PDF file in a known location (on the web), and see if that works.

          • 2. Re: Hyperlink Defaults if No Internet Access
            Dave Merchant MVP & Adobe Community Professional

            Unfortunately it isn't possible with just the JS API, as there's no timeout for a link to a remote URL - it's passed to the user's Web browser, and the browser won't return anything even if the file *was* opened. The app.openDoc() method won't pull remote content unless it's on a WebDAV server.

             

            It's possible to sniff for specific network access using rich media, but it won't guarantee an accurate response as the user may have a network but chooses to deny the security dialog you see whenever a local PDF pings a remote host. It's also highly annoying if the ping is fired every time the document opens. I'll cover this workflow in an upcoming tutorial, stay tuned!