473,396 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Selecting a textarea range based on surrounding text boundary

gf
I have text in a textarea that looks like this:

++++++++++++
This is line 1
This is line 2
++++++++++++
This is more text 1
This is more text 2
This is more text 3
++++++++++++
etc.
etc.
++++++++++++

I need to be able to click anywhere within the text bordered by ++++
and have all the text selected. A cross browser routine would be the
best (obviously), but if not possible, next best would be the latest
browsers, and if that's not possible, then IE only.

Thanks!
Jul 20 '05 #1
2 1728
gf
<BUMP>

"gf" wrote in message
news:2e**************************@posting.google.c om...
I have text in a textarea that looks like this:

++++++++++++
This is line 1
This is line 2
++++++++++++
This is more text 1
This is more text 2
This is more text 3
++++++++++++
etc.
etc.
++++++++++++

I need to be able to click anywhere within the text bordered by ++++
and have all the text selected. A cross browser routine would be the
best (obviously), but if not possible, next best would be the latest
browsers, and if that's not possible, then IE only.

Thanks!

Jul 20 '05 #2
gf
One last bump :)

"gf" wrote in message
news:2e**************************@posting.google.c om...
I have text in a textarea that looks like this:

++++++++++++
This is line 1
This is line 2
++++++++++++
This is more text 1
This is more text 2
This is more text 3
++++++++++++
etc.
etc.
++++++++++++

I need to be able to click anywhere within the text bordered by ++++
and have all the text selected. A cross browser routine would be the
best (obviously), but if not possible, next best would be the latest
browsers, and if that's not possible, then IE only.

Thanks!


Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Paweł | last post by:
I'm desinging a graphical interface and I frequently take advantage of the double click event. Unfortunately in most browsers double clicking also involves selecting and I would like to avoid that...
5
by: STB | last post by:
Hi, Can you pick out just the text that a user has selected in a TextArea using JS?
2
by: Mark Szlazak | last post by:
The following code fails in Firefox to get at selected text in the right-side textarea. Any help would be appreciated. <html> <head> <script> var agt = navigator.userAgent.toLowerCase();...
5
by: aqualizard | last post by:
I have searched and searched and searched... Can someone please tell me how (or "if" it is even possible) to change selected text in a textarea? Specifically, say a user has highlighted "ppl"...
4
by: jim | last post by:
Hi, I have a form that accepts free text from users in a single textarea field. I would like for a select list of words (15 or so) to autopopulate as the user types. For example, instead of...
2
by: movieking81 | last post by:
If someone could help me with this, that would be great. I need to select a number of records from an SQL table based on a date range, so I started with this select. <html> <code> resultssql =...
2
by: dennis.sprengers | last post by:
Ik ben bezig met een eigen UBB editor. Als iemand aan het typen is, zorgt CTRL-B voor een \-tag en nogmaals CTRL-B voor een \ tag. Als je eerst een selectie maakt en dan CTRL-B drukt, wordt de...
1
by: nagamalli26 | last post by:
hai iam new php. i am creating admin side. i wrote this, phpcode: <?php //include_once("config.php"); $con=mysql_connect("localhost","root",""); mysql_select_db("happysalary"); ?>
7
by: =?ISO-8859-1?Q?=22=C1lvaro_G=2E_Vicario=22?= | last post by:
I need to emulate the missing "maxlegth" attribute in "textarea" fields but all my Google searches either lead to obsolete scripts that overwrite the "value" property (thus losing caret position)...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.