FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Generating "download" pages
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Generating "download" pages [message #186416 is a reply to message #186415] Sat, 19 July 2014 20:54 Go to previous messageGo to previous message
Lew Pitcher is currently offline  Lew Pitcher
Messages: 60
Registered: April 2013
Karma:
Member
On Saturday 19 July 2014 16:38, in comp.lang.php, "Christoph M. Becker"
<cmbecker69(at)arcor(dot)de> wrote:

> Christoph M. Becker wrote:
>
>> One solution relying on client side ECMAScript support would be to add
>> the following script element to the document (e.g. at the bottom of the
>> body element):
>>
>> <script>window.location = "file-to-download.ext"</script>
>
> Of course the download resource has to be served with a Content-Type
> header field that forces the client to treat it as download.
>

Well, I'm not yet familiar enough with ECMAScript/JavaScript to write this
sort of facility into my web pages.

However, I have found a workaround that will suffice until I determine the
proper way to get both updated page /and/ download:

The request page (that which I want to update and redisplay) will contain
within it an (almost) invisible <iframe> linking to a /second/ page. That
second page will /only/ generate the file transfer headers and file.

Together, the two pages will do what I had hoped to do in one page.

Thanks to all for all the advice.
--
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Resolved: Generating "download" pages
Next Topic: Your opinion on which technologies to use when building web applications
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 00:12:26 GMT 2024

Total time taken to generate the page: 0.04783 seconds