<div>I think I&#39;m batting out of my league here but I&#39;m keen to learn.</div>
<div>&nbsp;</div>
<div>How would I implement Andrius&#39;s&nbsp;code?</div>
<div>&nbsp;</div>
<div>Below is my attempt to implement Lukas&#39;s code but it is not recognising submit, any ideas?</div>
<div>&nbsp;</div>
<div>Cheers,</div>
<div>&nbsp;</div>
<div>Dirk</div>
<div>&nbsp;</div>
<div>&nbsp;html form multipart; id: &#39;pictureUpload&#39;; with: [ <br>&nbsp;&nbsp;html form id: &#39;fileupload&#39;; multipart; with: [<br>&nbsp;&nbsp;&nbsp;html fileUpload </div>
<div>&nbsp;&nbsp;&nbsp; callback: [ : val | self product picture1: val ]; </div>
<div>&nbsp;&nbsp;&nbsp; onChange: (Seaside.SUForm new id: &#39;fileupload&#39;; submit&nbsp;)].<br>&nbsp;&nbsp;html submitButton <br>&nbsp;&nbsp;&nbsp;onClick: (html updater <br>&nbsp;&nbsp;&nbsp;&nbsp;id: &#39;uploadProductPictures&#39;; <br>&nbsp;&nbsp;&nbsp;&nbsp;triggerForm: &#39;pictureUpload&#39;;<br>
&nbsp;&nbsp;&nbsp;&nbsp;callback: [ :r | self renderUploadPictures: r ];<br>&nbsp;&nbsp;&nbsp;&nbsp;return: false); <br>&nbsp;&nbsp;&nbsp;text: &#39;Save&#39; ]<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 9/20/07, <b class="gmail_sendername">Andrius Paulavicius</b> &lt;<a href="mailto:apaulavicius@gmail.com">apaulavicius@gmail.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">use an hidden iframe for forms target<br><br>html iframe name: &#39;uiframe&#39;.<br><br>html form<br>&nbsp;&nbsp; attributeAt: &#39;target&#39; put: &#39;uiframe&#39;;
<br>&nbsp;&nbsp; ...<br><br>----- Original Message -----<br>From: dirk newbold<br>To: Seaside - general discussion<br>Sent: Thursday, September 20, 2007 1:03 AM<br>Subject: Re: [Seaside] Not able to upload [a Seaside.WAFile] through onClick
<br><br><br>Cheers, I&#39;ll give it a go<br><br><br>On 9/19/07, Lukas Renggli &lt;<a href="mailto:renggli@gmail.com">renggli@gmail.com</a>&gt; wrote:<br>&gt; But instead of returning&nbsp;&nbsp;&quot;a Seaside.WAFile&quot; it is returning the directory
<br>&gt; path.<br><br>File-upload do not work through XmlHttpRequest due to security<br>restrictions in the web-browser.<br><br>The easiest solution is to have a separate form around the upload<br>field and commit the whole form. Something along ...
<br><br>html form id: &#39;fileupload&#39;; multipart; with: [<br>html fileUpload<br>&nbsp;&nbsp;&nbsp;&nbsp;callback: [ :file | ... ];<br>&nbsp;&nbsp;&nbsp;&nbsp;onChange: (SUForm new<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id: &#39;fileupload&#39;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; submit) ]<br><br>If you want to go the AJAX way you have to do some nasty tricks using
<br>IFRAMES to push the data to the server. This is also what GMail is<br>doing for their file uploads for example.<br><br>Lukas<br><br>--<br>Lukas Renggli<br><a href="http://www.lukas-renggli.ch">http://www.lukas-renggli.ch
</a><br>_______________________________________________<br>Seaside mailing list<br><a href="mailto:Seaside@lists.squeakfoundation.org">Seaside@lists.squeakfoundation.org</a><br><a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br></blockquote></div><br>