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