[Proto-Scripty] Re: Using Ajax.Request to fetch an image
Ok, I see. Someone on the web proposed to encode images in base64 to be able to fetch them using text answer. Do you think it is a good idea? -- 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: Using Ajax.Request to fetch an image
I can see alot of security issues with that! Alex Mcauley http://www.thevacancymarket.com - Original Message - From: fma f...@gbiloba.org To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Friday, December 04, 2009 9:34 AM Subject: [Proto-Scripty] Re: Using Ajax.Request to fetch an image Ok, I see. Someone on the web proposed to encode images in base64 to be able to fetch them using text answer. Do you think it is a good idea? -- 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: Using Ajax.Request to fetch an image
On 04 Dec 2009, at 10:34, fma wrote: Ok, I see. Someone on the web proposed to encode images in base64 to be able to fetch them using text answer. Do you think it is a good idea? Let me rephrase what I meant (AJAX wasn't the correct term, you just need to rely on asynchronous events and callbacks instead of polling all the time): - Create your image object: new Image(); - Attach an onLoad event handler to that image object - Assign the .src to the image object. Remember: first define the onload handler, then assign the source url - Then you have a choice: either fire a custom event that you capture into another object prototype that does the actual processing or just fill in the handler right away Best regards Peter De Berdt -- 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: Using Ajax.Request to fetch an image
That's what I did, using 'observe' to register the 'load' event. Not that I had to use stopObserving() to ensure that the callback was not called several times... -- 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.