[Proto-Scripty] Re: File output
Hi, 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 -- 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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] Re: File output
speedpac...@gmail.com wrote: Hi, 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 -- 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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] Re: File output
speedpac...@gmail.com wrote: Hi, 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). 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 -- 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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@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 -- 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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] Re: File output
Ajax cannot process a file download in the same way it cannot process a file upload... You have to output the link and make the user click it Alex Mcauley http://www.thevacancymarket.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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
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. you want to investigate the following header info //cache controlling header(Cache-Control: public); //force download header(Content-Description: File Transfer); //set filename header(Content-Disposition: attachment; filename=export.csv); there are others of course 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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] Re: File output
I'm not often wrong but i am right this time !!! Alex Mcauley http://www.thevacancymarket.com - 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. you want to investigate the following header info //cache controlling header(Cache-Control: public); //force download header(Content-Description: File Transfer); //set filename header(Content-Disposition: attachment; filename=export.csv); there are others of course 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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: File output
he replied to my mail :p I guess we're all right this time - what a wonderful world it is ;) On Dec 11, 4:08 pm, Alex McAuley webmas...@thecarmarketplace.com wrote: I'm not often wrong but i am right this time !!! Alex Mcauleyhttp://www.thevacancymarket.com - 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. you want to investigate the following header info //cache controlling header(Cache-Control: public); //force download header(Content-Description: File Transfer); //set filename header(Content-Disposition: attachment; filename=export.csv); there are others of course 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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] Re: File output
Not always m8 but thanks for the confidence! Alex Mcauley http://www.thevacancymarket.com - 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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.