RE: Download then display page

2013-04-30 Thread Jim Schueler
To clarify, I meant to say, "I only occassionally write handlers". :) -Jim On Tue, 30 Apr 2013, Chris Faust wrote: Thanks Jim, I'm going to give that a try and see if I can get it to work. -Chris -Original Message- From: Jim Schueler [mailto:jschue...@eloquency.com] Sent: Tuesday, A

RE: Download then display page

2013-04-30 Thread Chris Faust
Thanks Jim, I'm going to give that a try and see if I can get it to work. -Chris -Original Message- From: Jim Schueler [mailto:jschue...@eloquency.com] Sent: Tuesday, April 30, 2013 2:28 PM To: Chris Faust Cc: modperl@perl.apache.org Subject: RE: Download then display page Yes, that's w

Re: Download then display page

2013-04-30 Thread Adam Prime
I think people still generally rely on meta redirects or javascript to accomplish this type of behaviour, though I'm curious to know if what you describe here actually works across browsers. Adam On 13-04-30 02:27 PM, Jim Schueler wrote: Yes, that's what I have in mind. I only occassionally

RE: Download then display page

2013-04-30 Thread Jim Schueler
Yes, that's what I have in mind. I only occassionally write headers. But I envision something similar to what you've got below: $redirect = ... ; ## URL to the spreadsheet $r->content_type('text/html') ; $r->headers_out->set( Location => $redirect ) ; $r->send_http_header ; $r->

RE: Download then display page

2013-04-30 Thread Chris Faust
>>But the response should be a redirect to a URL that returns the spreadsheet instead of a 200 OK. I believe that the body of the original response will be displayed until the redirect succeeds. I'm not sure what I follow you, something like this? $r->content_type('text/html'); print $content->o

Re: Download then display page

2013-04-30 Thread Jim Schueler
I believe the following will work (never tried it though): The request should return a 'text/html' type document that displays the instructions. But the response should be a redirect to a URL that returns the spreadsheet instead of a 200 OK. I believe that the body of the original response

Download then display page

2013-04-30 Thread Chris Faust
Hi, I'm trying to have a form submission package up the results in a xls file and then start the download for the user as well as present a page where they can click on the file if the download has not already automatically started. I can do each separately but not both together, I have som