<div>Hi,</div><div>I&#39;ve implemented an &#39;ajax style&#39; file upload component using a hidden iframe and setting the target of file-upload form to the hidden iframe, all based on the description in this message: <a href="http://lists.squeakfoundation.org/pipermail/seaside/2007-September/014368.html">http://lists.squeakfoundation.org/pipermail/seaside/2007-September/014368.html</a></div>
<div><br></div><div>The simplified rendering code is:</div><div><br></div><div><div>renderContentOn: html</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>html text: &#39;Upload a file:&#39;.</div><div>
<span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>html form</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>attributeAt: &#39;target&#39; put: &#39;hiddenImageUploader&#39;;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>multipart;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>with:<span class="Apple-tab-span" style="white-space:pre">        </span>[</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>html fileUpload</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>callback: [:aFile| file := aFile];</div><div>                                onChange: (&#39;this.form.submit()&#39;)</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>].</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>html iframe </div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>name: &#39;hiddenImageUploader&#39;;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>style: &#39;position:absolute;top:-1000px;left:-1000px&#39;; </div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>contents: [self renderIFrameContentOn: html]</div></div><div><br></div><div>It works as anticipated, except that after a file is uploaded the html response comes from rendering a complete page. This becomes the content of the iframe. Ideally I&#39;d like the iframe content just to contain a set of image tags referencing the uploaded images that I can then use as feedback on the main page via an onload hook and some jQuery DOM manipulation.</div>
<div><br></div><div>My first attempted solution tried to replace the contents of the response buffer with my desired content, see: <a href="http://lists.squeakfoundation.org/pipermail/seaside/2010-February/022499.html">http://lists.squeakfoundation.org/pipermail/seaside/2010-February/022499.html</a>. The problem is the response buffer already contains a partial response before my code is called.</div>
<div><br></div><div>My new plan is to change the rendering pass after my callback is fired to route it directly to my custom rendering code. Unfortunately I don&#39;t understand the way in which code is called in the various phases of a Seaside response. Is it possible to force the rendering phase to a specific block of code, or simply pass a string containing the html I wish to return to the rendering phase?</div>
<div><br></div><div>Thanks in advance,</div><div><br></div><div>Nick</div>