Hi Avi,<div><br></div><div>Thanks for answering. My problem is I don&#39;t have the first idea where to look, I can&#39;t find a single example that suits me, they&#39;re all for plain HTML...</div><div><br></div><div>Bernat.</div>

<div><br><div class="gmail_quote">2011/2/3 Avi Shefi <span dir="ltr">&lt;<a href="mailto:avishefi@gmail.com">avishefi@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div dir="ltr"><font color="#330033"><font size="2"><font face="tahoma,sans-serif">Bernat,<br>You can either use Javascript to put the selected text into some hidden element, which on callback will be available as an element value, or you can use Ajax to send the value back (instead of submitting it using an onClick event).<br>


<br><br>Regards,<br>Avi.<br></font></font></font><br><div style="margin:0pt" name="sig_83fa755cf9"></div><div class="gmail_quote"><div><div></div><div class="h5">On Thu, Feb 3, 2011 at 2:00 PM, AxiNat <span dir="ltr">&lt;<a href="mailto:tibabenfortlapalanca@gmail.com" target="_blank">tibabenfortlapalanca@gmail.com</a>&gt;</span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div></div><div class="h5">Hi list,<div><br></div><div>I&#39;ve been wrecking my brains all morning long trying to get to reference the selected text in a textArea by using javascript or whatever means.</div>


<div><br></div><div>So long, I&#39;ve found a couple of snippets that should do the job, for example:</div>

<div><br></div><div><div>function getFocusedTextArea() {</div><div>  var textareas = document.getElementsByTagName(“textarea”);</div><div>  for(var i=0; i lessthan textareas.length; i++) {</div><div>    var ta = textareas.item(i);</div>




<div>    if (window.getComputedStyle(ta, null).zIndex == 57) {</div><div>      return ta;</div><div>    }</div><div>  }</div><div>}</div></div><div><br></div><div>The problem is that I don&#39;t know how to store the value returned by getFocusedTextArea() into a variable inside a component. I&#39;d like something similar to:</div>




<div><br></div><div>html submitButton</div><div>   onClick: (html doSomethingMagicInJavascript:</div><div>       [aString := html andSomethingElseMagic: &#39;getFocusedTextArea();&#39;]);</div><div>   with: &#39;Get the selected text magically&#39;.</div>




<div><br></div><div>Is there such thing?</div><div><br></div><div>Thanks!</div><div><br></div><div>Bernat Romagosa.</div>
<br></div></div>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br></div>
<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" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br></div>