<div>Thanks for the help.</div>
<div> </div>
<div>Cheers,</div>
<div> </div>
<div>Dirk<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">I just do something like:<br><br> html iframe name: 'fileupload';<br> html form<br> attributeAt: 'target' put: 'fileupload';
<br> multipart;<br> with: [<br> html fileUpload callback: [:f | file := f].<br> html submitButton<br> onClick: (html evaluator callback: [:script |<br> self validateFile.
<br> self updateErrorMesage: script]);<br> text: 'upload'].<br><br>I hide the iframe by setting its style to<br> height: 0;<br> width: 0;<br> border-style: none;<br><br>doe's uploading without refreshing the rest of the page and seems to work
<br>in both firefox and ie<br><br>----- Original Message -----<br>From: "Lukas Renggli" <<a href="mailto:renggli@gmail.com">renggli@gmail.com</a>><br>To: "Seaside - general discussion" <<a href="mailto:seaside@lists.squeakfoundation.org">
seaside@lists.squeakfoundation.org</a>><br>Sent: Thursday, September 20, 2007 11:43 AM<br>Subject: Re: [Seaside] Not able to upload [a Seaside.WAFile] through onClick<br><br><br>>> Below is my attempt to implement Lukas's code but it is not recognising
<br>>> submit, any ideas?<br>><br>> 1. Do never nest forms. This won't work and will lead to all kind of<br>> strange problems (different ones in different browsers).<br>><br>> 2. You don't need the submit button, as the form is automatically
<br>> submitted when the user selects a file. This automatically causes a<br>> full refresh.<br>><br>>> How would I implement Andrius's code?<br>><br>> This involves some JavaScript programming, that is actually very
<br>> similar to the code used in the (totally unrelated) Comet package.<br>><br>> 1. You create a named IFRAME that you hide somewhere on your page<br>> (move it somewhere outside the visible viewport, fully hiding the
<br>> thing breaks some browsers).<br>><br>> 2. You assign an onLoad event to the IFRAME that updates the part of<br>> the page after the successful upload.<br>><br>> 3. As presented you set the target of your form to the IFRAME.
<br>> Combined with the #onChange: on the file-upload you don't even need a<br>> submit button.<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>_______________________________________________<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>