Regarding the first part, AJAX requests do not need refreshing the client page. Just concentrate on a test JS script where you click a button, it does AJAX request to server and presents some results in a div.

Yes, this is exactly the problem. I'm familiar with AJAX, having learned several years ago to use it, rolling my own jQuery-free, no module, Javascript routines for this. The problem is that the http headers for a download are not compatible (as far as I can tell) with sending to a single div on a page--the download wants to BE the page. I have yet to get any download dialogue in the browser through an AJAX-initiated request. The only way I have ever gotten it to work is through standard form submission. I guess I'm just ignorant, because I am quite sure there must be a way to do it, but I can't wrap my mind around how to get the browser to download something sent back to a form element on the page via AJAX. If the others were instructing me in how to accomplish this, I haven't grasped it yet.

Blessings,

~Polyglot~


In reply to Re^6: Can two separate responses be sent to the client's browser from Perl, such as via fork{}? by Polyglot
in thread Can two separate responses be sent to the client's browser from Perl, such as via fork{}? by Polyglot

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.