I am a relative AJAX neophyte and a complete newbe to prototype.
I have an application that successively loads a series of php pages into the same div without problem using Ajax.updater.
The last php script, instead of generating html, writes a file to the output in OpenOffice Writer format (with the appropriate headers) so instead of displaying the result I want it to do a file download.
(http://www.phpclasses.org/browse/package/5797.html)
Now we get to the place I am lost.
I presume that instead of Ajax.updater I want to do something else
(Ajax Request ?) but I am not sure how to do this.
-- Bill Drescher
william {at} TechServSys {dot} com
I'm not sure if it's the right way to do, but I just do an http call
(just link to the url), and make sure that my PHP script returns the
appropiate headers for the browser to download the file rather than
open it inline...
I don't think you need ajax for this...
On Dec 11, 3:10 pm, bill <will...@techservsys.com> wrote:
> I am a relative AJAX neophyte and a complete newbe to prototype.
> I have an application that successively loads a series of php pages into
> the same div without problem using Ajax.updater.
> The last php script, instead of generating html, writes a file to the
> output in OpenOffice Writer format (with the appropriate headers) so
> instead of displaying the result I want it to do a file download.
> (http://www.phpclasses.org/browse/package/5797.html)
> Now we get to the place I am lost.
> I presume that instead of Ajax.updater I want to do something else
> (Ajax Request ?) but I am not sure how to do this.
> --
> Bill Drescher
> william {at} TechServSys {dot} com
----- Original Message ----- From: <speedpac...@gmail.com>
To: "Prototype & script.aculo.us" <prototype-scriptaculous@googlegroups.com>
Sent: Friday, December 11, 2009 2:43 PM
Subject: [Proto-Scripty] Re: File output
I'm not sure if it's the right way to do, but I just do an http call
(just link to the url), and make sure that my PHP script returns the
appropiate headers for the browser to download the file rather than
open it inline...
I don't think you need ajax for this...
On Dec 11, 3:10 pm, bill <will...@techservsys.com> wrote:
> I am a relative AJAX neophyte and a complete newbe to prototype.
> I have an application that successively loads a series of php pages into
> the same div without problem using Ajax.updater.
> The last php script, instead of generating html, writes a file to the
> output in OpenOffice Writer format (with the appropriate headers) so
> instead of displaying the result I want it to do a file download.
> (http://www.phpclasses.org/browse/package/5797.html)
> Now we get to the place I am lost.
> I presume that instead of Ajax.updater I want to do something else
> (Ajax Request ?) but I am not sure how to do this.
> --
> Bill Drescher
> william {at} TechServSys {dot} com
--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to prototype-scriptaculous+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
speedpac...@gmail.com> wrote:
> I'm not sure if it's the right way to do, but I just do an http call
> (just link to the url), and make sure that my PHP script returns the
> appropiate headers for the browser to download the file rather than
> open it inline...
> I don't think you need ajax for this...
> On Dec 11, 3:10 pm, bill <will...@techservsys.com> wrote:
> > I am a relative AJAX neophyte and a complete newbe to prototype.
> > I have an application that successively loads a series of php pages into
> > the same div without problem using Ajax.updater.
> > The last php script, instead of generating html, writes a file to the
> > output in OpenOffice Writer format (with the appropriate headers) so
> > instead of displaying the result I want it to do a file download.
> > (http://www.phpclasses.org/browse/package/5797.html)
> > Now we get to the place I am lost.
> > I presume that instead of Ajax.updater I want to do something else
> > (Ajax Request ?) but I am not sure how to do this.
> > --
> > Bill Drescher
> > william {at} TechServSys {dot} com
> --
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To post to this group, send email to
> prototype-scriptaculous@googlegroups.com.
> To unsubscribe from this group, send email to
> prototype-scriptaculous+unsubscribe@googlegroups.com<prototype-scriptaculou s%2Bunsubscribe@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
----- Original Message ----- From: Brian Williams To: prototype-scriptaculous@googlegroups.com Sent: Friday, December 11, 2009 2:52 PM
Subject: Re: [Proto-Scripty] Re: File output
you would be exactly right.
and to protect from hot linking then check the http referrer or a session variable and if that fails then redirect to a landing page.
On Fri, Dec 11, 2009 at 9:43 AM, speedpac...@gmail.com <speedpac...@gmail.com> wrote:
I'm not sure if it's the right way to do, but I just do an http call
(just link to the url), and make sure that my PHP script returns the
appropiate headers for the browser to download the file rather than
open it inline...
I don't think you need ajax for this...
On Dec 11, 3:10 pm, bill <will...@techservsys.com> wrote:
> I am a relative AJAX neophyte and a complete newbe to prototype.
> I have an application that successively loads a series of php pages into
> the same div without problem using Ajax.updater.
> The last php script, instead of generating html, writes a file to the
> output in OpenOffice Writer format (with the appropriate headers) so
> instead of displaying the result I want it to do a file download.
> (http://www.phpclasses.org/browse/package/5797.html)
> Now we get to the place I am lost.
> I presume that instead of Ajax.updater I want to do something else
> (Ajax Request ?) but I am not sure how to do this.
> --
> Bill Drescher
> william {at} TechServSys {dot} com
--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to prototype-scriptaculous+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to prototype-scriptaculous+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
> On Fri, Dec 11, 2009 at 9:43 AM, speedpac...@gmail.com <speedpac...@gmail.com> wrote:
> I'm not sure if it's the right way to do, but I just do an http call
> (just link to the url), and make sure that my PHP script returns the
> appropiate headers for the browser to download the file rather than
> open it inline...
> I don't think you need ajax for this...
> On Dec 11, 3:10 pm, bill <will...@techservsys.com> wrote:
> > I am a relative AJAX neophyte and a complete newbe to prototype.
> > I have an application that successively loads a series of php pages into
> > the same div without problem using Ajax.updater.
> > The last php script, instead of generating html, writes a file to the
> > output in OpenOffice Writer format (with the appropriate headers) so
> > instead of displaying the result I want it to do a file download.
> > (http://www.phpclasses.org/browse/package/5797.html)
> > Now we get to the place I am lost.
> > I presume that instead of Ajax.updater I want to do something else
> > (Ajax Request ?) but I am not sure how to do this.
> > --
> > Bill Drescher
> > william {at} TechServSys {dot} com
> --
> You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
> To post to this group, send email to prototype-scriptaculous@googlegroups.com.
> To unsubscribe from this group, send email to prototype-scriptaculous+unsubscribe@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/prototype-scriptaculous?hl=en.
> --
> You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
> To post to this group, send email to prototype-scriptaculous@googlegroups.com.
> To unsubscribe from this group, send email to prototype-scriptaculous+unsubscribe@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/prototype-scriptaculous?hl=en.
----- Original Message ----- From: bill To: prototype-scriptaculous@googlegroups.com Sent: Friday, December 11, 2009 9:38 PM
Subject: Re: [Proto-Scripty] Re: File output
speedpac...@gmail.com wrote: he replied to my mail :p I guess we're all right this time - what a
wonderful world it is ;
I haven't replied at all, until now.
On Dec 11, 4:08 pm, "Alex McAuley" <webmas...@thecarmarketplace.com>
wrote:
I'm not often wrong but i am right this time !!!
I feel much better about not being able to do what I couldn't do.
I guess I will open the last script in a new window and go from there.
Thanks all.
Alex is always right, as far as I know.
-- Bill Drescher
william {at} TechServSys {dot} com
--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to prototype-scriptaculous+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
No need to open a new window - if it starts downloading you'll be left
with an empty window ;)
Just do an HTTP call to the server and your original page will remain
in the window if you have the correct headers going out from your
PHP...
David
On Dec 11, 10:38 pm, bill <will...@techservsys.com> wrote:
> speedpac...@gmail.com wrote:
> > he replied to my mail :p I guess we're all right this time - what a
> > wonderful world it is ;
> I haven't replied at all, until now.> On Dec 11, 4:08 pm, "Alex McAuley" <webmas...@thecarmarketplace.com>
> > wrote:
> >> I'm not often wrong but i am right this time !!!
> I feel much better about not being able to do what I couldn't do.
> I guess I will open the last script in a new window and go from there.
> Thanks all.
> Alex is always right, as far as I know.
> --
> Bill Drescher
> william {at} TechServSys {dot} com
> No need to open a new window - if it starts downloading you'll be left
> with an empty window ;)
> Just do an HTTP call to the server and your original page will remain
> in the window if you have the correct headers going out from your
> PHP...
Would you be so kind as to expand your suggestion, perhaps with a line of code ?
> David
-- Bill Drescher
william {at} TechServSys {dot} com
> No need to open a new window - if it starts downloading you'll be left
> with an empty window ;)
> Just do an HTTP call to the server and your original page will remain
> in the window if you have the correct headers going out from your
> PHP...
Interestingly enough, when I do a window.open() and the script just does a download, the window does not actually open, just the download dialog. No orphan window after that (in FireFox).
>>> he replied to my mail :p I guess we're all right this time - what a
>>> wonderful world it is ;
>> I haven't replied at all, until now.> On Dec 11, 4:08 pm, "Alex McAuley" <webmas...@thecarmarketplace.com>
>>> wrote:
>>>> I'm not often wrong but i am right this time !!!
>> I feel much better about not being able to do what I couldn't do.
>> I guess I will open the last script in a new window and go from there.
>> Thanks all.
>> Alex is always right, as far as I know.
>> --
>> Bill Drescher
>> william {at} TechServSys {dot} com
> --
> You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
> To post to this group, send email to prototype-scriptaculous@googlegroups.com.
> To unsubscribe from this group, send email to prototype-scriptaculous+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
-- Bill Drescher
william {at} TechServSys {dot} com