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 9271079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:31:46+00:00 2026-06-18T15:31:46+00:00

The code on the html page is: <a href=getReport.php?id=123>View report in a new window</a>

  • 0

The code on the html page is:

<a href="getReport.php?id=123">View report in a new window</a>

Once any user clicks on it, it becomes downloaded (it is a .png file) by his browser and he is able to view it.

How can we make it opened in a new window instead?

  • 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-06-18T15:31:47+00:00Added an answer on June 18, 2026 at 3:31 pm

    Q: Do you mean “getReport.php?id=123” isn’t rendering as a .png image (it’s asking the user to download)? Or is it displaying as an image, but you want it to display in a new, separate window?

    If the former, you need to make sure the server sends the correct Content-type (e.g. “image/png”).

    If the latter, just do a Javascript “window.open()” (or equivalent)

    ======== UPDATE =======

    My 1990’s heritage with Javascript 1.2 is catching up with me 🙂 Don’t use “window.open()” – do as Pandian says and use if you want to implement a pop-up window. Here are more details:

    • http://javascript.info/tutorial/popup-windows

    By the same token, your question is vague. If the problem is that the file is asking you to “download” (if the image isn’t appearing anywhere), then your PHP program isn’t sending the file correctly. At a minimum, it must set “Content-type” before it sends the binary .png data.

    ‘Hope that helps…

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

Sidebar

Related Questions

The JavaScript code window.print() can print the current HTML page. If I have a
This code on an html page comes in as one line. Why isn't backslash
I tried using the following code for a HTML page, but it doesn't work.
My index.html page for my project needs some Ruby code so I need to
I have saved an html page using the following line of code : NSURL
I've a simple html page with no code in the body tag. I want
I can get my page's html code during my program and what I want
i have the following code to try and load a local html page in
The simple code block below can be served up in a static HTML page
I'm currently downloading an HTML page, using the following code: Try Dim req As

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.