In keeping with your "old school" pattern, what you need to do first is create an endpoint that is called in the new tab that displays what you want. You'd have to have some form of persistence on the backend server so that it knows what values to display. So the flow looks like this:
  1. Visitor arrives to form and establishes a "session"
  2. User submits form to "action" URL
  3. "action" URL accepts request, saves response to the database; updates the "session" with an identifier
  4. onSubmit, JavaScript does it's thing and opens up display endpoint in a new tab
  5. the "session" id is communicated via the request
  6. secondary endpoint uses session to select what response data needs to be displayed
  7. output table is generated and response is sent to the browser

OTOT, the "modern" approach would be to do effectively the same thing; but all in the same window and using an API call that returns structure data of what should be rendered after "submit" and some JS/CSS magick. You could also do effectively the same thing by skipping the secondary call and just using what was entered into the form as the source of the final view.


In reply to Re: Open new window after form submit by perlfan
in thread Open new window after form submit by tel2

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.