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

  • Home
  • SEARCH
  • 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 7838095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:58:37+00:00 2026-06-02T14:58:37+00:00

I am using nodejs and the framework express.js to realize my website. I am

  • 0

I am using nodejs and the framework express.js to realize my website.

I am submitting a POST request on an url (/report/reportname) reportname is a variable.

so I do this :

app.post('/report/:id', function(req, res){ 
   var id=req.param('id');
   var bodyreportHtml;
   go.prototype.runReport(id,res);
  }

The thing is that in go.prototype.runReport(id,res)
I do a res.send(bodyofthereport).
So when I click on submit on my form that just redirect me on /report/nameofthereport where the pdf report is.
Everything is working but I would like to put this url /report/nameofthereport (the pdf report) in an iframe.
So when I submit the post request I want it just refresh the iframe and print the report in it ( the iframe is on the same page than the form).
But the res.send(bodyofthereport) is essential : it prints my report at /report/nameofthereport
And I can’t do a res.redirect('/') because the body is finished

How can I do ?

Thanks !

  • 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-02T14:58:39+00:00Added an answer on June 2, 2026 at 2:58 pm

    If you want to POST to an iframe, you could just set the target attribute of the form to the name of the iframe:

    <form action='/report/ID' method='POST' target='FOO'></form>
    
    <iframe name='FOO'></iframe>
    

    Nothing node.js or Express specific about this!

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

Sidebar

Related Questions

Am trying to implement scraping using nodejs. Am sending request to a particular url
I'm writing a login for a website in node.js using the express framework. However,
I'm using Node.js together with Express framework and i18n module . So I use
I have an existing app written in PHP (using Kohana framework) and I want
I'm considering using Express framework in my next node.js project. However, a stumbling block
I am using express (web framework for node.js) with ejs. Now I'd like to
I have a web app built using ExtJS framework. I have a tree in
I want to rewrite a complete community website in nodejs,express and nowjs with mongodb.
I am using node.js with the express framework. As a session store I am
I'm currently developing a web application using Struts2 framework. This application requires to dynamically

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.