1 Reply Latest reply on Dec 6, 2014 12:37 AM by try67

    Javascript to Open URL in New Window w/o Toolbars


      Hello All,


      I need to find a way to open a link in a PDF and have it go into its own window without navigation bars.


      I have tried to do this in a multitude of ways to no avail.


      First: I tried to write html with javascript for what I need

      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <style type="text/css">
      function popitup(link) {
        var w = window.open(link.href,
        return w?false:true; // allow the link to work if popup is blocked
      <p class="title"><strong>Knowledge  Check Assessment</strong><br/><img src="line.jpg" alt="line" width="720" height="1" align="top" /></p>
      <p class="normal">Complete the  <a href="http://www.google.com" onClick="return popitup(this)" target="_blank">Assessment</a> to check your understanding.</p>


      This worked fine when opened in a browser, but when I turned the webpage into a PDF all the scripting disappeared... which makes sense but I thouhgt this might work.


      Second:  I tried to change the link inside the pdf to run JavaScript directly instead of in launching the URL. I used this:



      Which seemed to do nothing at all.


      So after researching I found this: https://forums.adobe.com/thread/727714?tstart=0

      Which referenced a Adobe page that might indicate that what I need to do isn't possible at all, but the language is so muddy I cant decipher it.


      So I tried the code suggested by the gentelman there George_Johnson

      app.launchURL("http://www.example.com/example.html", true);

      Which works, but does not include the part about not having toolbars and menu bars etc, and each time I try to add it I get a syntax error.


      Does anyone have any idea if what I am trying to do is possible, and if so what am I doing wrong?


      Thank you so much for your time and attention to this issue, I have been working on this a big portion of the day and I am at a standstill on my project until I reach a resolution.