<div>I think I'm batting out of my league here but I'm keen to learn.</div>
<div> </div>
<div>How would I implement Andrius's code?</div>
<div> </div>
<div>Below is my attempt to implement Lukas's code but it is not recognising submit, any ideas?</div>
<div> </div>
<div>Cheers,</div>
<div> </div>
<div>Dirk</div>
<div> </div>
<div> html form multipart; id: 'pictureUpload'; with: [ <br> html form id: 'fileupload'; multipart; with: [<br> html fileUpload </div>
<div> callback: [ : val | self product picture1: val ]; </div>
<div> onChange: (Seaside.SUForm new id: 'fileupload'; submit )].<br> html submitButton <br> onClick: (html updater <br> id: 'uploadProductPictures'; <br> triggerForm: 'pictureUpload';<br>
callback: [ :r | self renderUploadPictures: r ];<br> return: false); <br> text: 'Save' ]<br><br> </div>
<div><span class="gmail_quote">On 9/20/07, <b class="gmail_sendername">Andrius Paulavicius</b> <<a href="mailto:apaulavicius@gmail.com">apaulavicius@gmail.com</a>> 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: 'uiframe'.<br><br>html form<br> attributeAt: 'target' put: 'uiframe';
<br> ...<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'll give it a go<br><br><br>On 9/19/07, Lukas Renggli <<a href="mailto:renggli@gmail.com">renggli@gmail.com</a>> wrote:<br>> But instead of returning "a Seaside.WAFile" it is returning the directory
<br>> 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: 'fileupload'; multipart; with: [<br>html fileUpload<br> callback: [ :file | ... ];<br> onChange: (SUForm new<br> id: 'fileupload';<br> 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>