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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:26:15+00:00 2026-06-15T18:26:15+00:00

I am facing an interesting issue: Currently I have a button that says Print,

  • 0

I am facing an interesting issue:

Currently I have a button that says “Print”, which is located at the end of a series of pages where users can enter information, make selections and obtain a unique result.

When they press this button, data representing the state of the application will be sent via JQuery’s .post(). Once the target script processes that data and stores it in the database against a unique ID, that ID is sent back to the success handler. The ID is then used in the success handler to open a new window that will pull down the data they sent off and display it in a printable manner.

$.post("api/PrintJob.php", applicationStateJSON, function(response)
{
    window.open("print/?job=" + response.token);

}, "json");

Because the window.open() call is not directly within a click handler, the popup is understandably blocked.

I can’t simply use window.location.href = ?; because the state of the application needs to be maintained in case the user wants to go back a step and make some changes, etc.

Currently my only solution is to have a secondary button appear within the success handler, and have that launch the print window. I would however prefer to retain the current feel and have the window open in a new tab / window / popup / whatever if possible, without being blocked.

Maybe there is a way that I can launch the popup empty when I initially click print, and then reload it when the data has hit the database?

Any ideas are welcome.

  • 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-15T18:26:16+00:00Added an answer on June 15, 2026 at 6:26 pm

    My suggestion will be to open a window on first click and then do a post from the newly opened window. The response of the post is received in the newly opened window. This response can be used to paint the new window using JS/JQuery.

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

Sidebar

Related Questions

I am facing interesting problem. I have discovered, that Samsung in it's own Android
I'm currently developing a Django site in which users can have multiple 'accounts', so
I am facing some critical issue which might be interesting for whom , those
Facing some issue in Talend Admin Console, the jobs that are running from IDE
I have an interesting database problem. I have a DB that is 150GB in
My son just discovered that he could hit my view's Done button, which flips
I'm facing an interesting issue with a regexp, i'm using this within a small
I'm facing an interesting problem here. I have a piece of code where I'd
The challenge I am facing with Ninject currently is that when I use Rebind<>()
We just came across an interesting issue which we face during unit testing of

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.