Ultimate Web Site Drop Down Menu Forum

Ultimate Web Site Drop Down Menu Forum (http://www.udm4.com/forum/index.php)
-   Javascript (http://www.udm4.com/forum/forumdisplay.php?f=9)
-   -   Select part of textarea using javascript (http://www.udm4.com/forum/showthread.php?t=273)

bcarl314 08-15-2007 01:18 PM

Select part of textarea using javascript
 
Hi,I'd like to use javascript to select part of a textarea. To be more specific, I have the start and end location in the textarea I want to select. How can I use this cordinates to make a selection in the textarea that works in both Firefox and IE.Any suggestions welcome!Thank you for your...

11-02-2007 05:15 PM

selected text
 
Quote:

Originally Posted by bcarl314 (Post 350)
Hi,I'd like to use javascript to select part of a textarea. To be more specific, I have the start and end location in the textarea I want to select. How can I use this cordinates to make a selection in the textarea that works in both Firefox and IE.Any suggestions welcome!Thank you for your...

Hey Friend, I have been having issues with this dilema and have done it in IE but when it comes to Firefox the buttons won't select the text. If you can take it any further to make it work with firefox please let me know. Here is what I propose.

<table cellSpacing=2 cellPadding=3 width="400px">
<tr>
<td class=table_head vAlign=top width="40%">Coding</td>
<td vAlign=top width="10%">&nbsp;</td>
</tr>
<tr>
<td class=table_text vAlign=top width="40%"><textarea cols=55 name="mytextarea">"Some Text Goes Here"</textarea></td>
<td vAlign=top width="10%"><p><input type=button value="[Select Text]" onClick="mytextarea.focus();mytextarea.select();" border=0 /></p></td>
</tr></table>


All times are GMT. The time now is 08:16 AM.

Powered by vBulletin® Version 3.0.1
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.