|
Post by davos1 on Mar 1, 2009 19:02:45 GMT -5
Hi, ;D
is it possible in RB to get the selected text from a textarea? it is for an easy editor , but the select part is missing...
I found an script in js that does that, but how to convert it to RB ? is the form method required ?
thanks a lot
<script language="JavaScript"> function display(txtarea){ var sl = (txtarea.value).substring(txtarea.selectionStart, txtarea.selectionEnd); prompt ("The place you have selected is:",sl); } </script> <body bgcolor="white" onload="thisForm=document.frmKey;"> <form method="POST" action="art466.html" id="frmTest" name="frmKey"> <textarea name="entry" rows="10" cols="70">Dallas, got a soft machine. Houston, too close to New Orleans. New York's got the ways and means, but just won't let you be, oh no.</textarea> <br /> Select your city, and click the place button below.<br /> <img onClick="display(thisForm.entry);" src="images/place.gif"> </form>
|
|