Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4618578
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:17:14+00:00 2026-05-22T02:17:14+00:00

I have an HTML web page (the parent) that contains a hyperlink. When clicked,

  • 0

I have an HTML web page (the parent) that contains a hyperlink. When clicked, it opens a new window and displays another HTML document (the child):

 <a href="/testhtml.html" target="_blank">Open Child</a>

Inside the child document are several links that are constructed like this:

 <a href="#" onclick='opener.window.location.href="/somewhere.html";
                   window.close();'>Make Parent Go Somewhere</a>

So the effect is that you can click on a link in the child window, it will cause the parent window to go to that new uri, and then close itself. This works wonderfully.

I’d like to do that same thing with a PDF as the child document. I can embed hyperlinks in the PDF just fine, or even embed Javascript:

  13 0 obj
  <<
  /Type /Action
  /S /JavaScript /JS
    (opener.window.location.href="/somewhere.html";)
  >>
 endobj

The Javascript gets triggered nicely, but the object “opener” is not defined. (ReferenceError: opener is not defined 1: Link:Mouse Up) Is what I’m looking to do even possible? What would be the object I would use to access the opening window’s uri?

PS: If it’s a problem, I do have some control over the user’s target environment. I can specify that they use Acrobat Reader, and even a later version of it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T02:17:15+00:00Added an answer on May 22, 2026 at 2:17 am

    HTML and PDF don’t use the same object model. None the less, it’s possible to get HTML and PDF JS to talk to one another:

    Getting notified when the user clicks a link in an embedded PDF

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web page with several HTML Select controls that all allow multiple
I have a web page that contains a div element called #order_details that is
I have a web page with large div(for example white) and another div that
I have an HTML page (say welcome.html) which contains an iframe to a page
I have a HTML page that scrolls up and down (not a lot, but
I have the main page that contains multiple frames within the frameset. One of
I have an HTML 5 web page using CSS 3 and have tested it
I have a web page with 2 listboxes (HTML select control). The first listbox
I have a new web app that is packaged as a WAR as part
I have a static html web page for my website and recently was not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.