[Seaside] Uploading an image using AJAX and iframes
richard.durr at googlemail.com
Fri Aug 21 19:35:36 UTC 2009
I am currently implementing an ImageChooser Component, where I like users to
upload an image by submtiting the form containing the fileUpload using an
iframe like this:
html form id: (self formId); attributeAt: #target put: (self frameName);
multipart; method: #post; with: [
id: self uploadInputId;
accept: 'png jpg jpeg gif';
on: #image of: self.
html div with: [
with: 'Upload Image'.
html iframe name: self frameName; style: 'display: none; widht: 0; height:
0; border: 0;'.
This works – but it loads the entire page into the iframe, again. I would
upload was successful or not and executes in the context of the original
html. I tried to return a response during the setting of my component's
image instance-variable but this does not work.
Has anybody an Idea?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside