473,545 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

textarea problems

say i have a form where, if a user clicks in it, all the text is
highlighted, and where, if a user clicks on a button outside of the
form, a certain text string is inserted where the cursor in the
textarea is. why is it, then, that when i, immediatly after loading
the page, click in the textarea, highlighting the text, click again in
the middle of the text (effectively unhighlighting everything, as
well), and then click on the button to insert to the text, the text
string that is to be inserted appears outside of the form?

here's a working demonstration:

http://www.geocities.com/terra1024/error-forms.html

if you click right before the first and only capatilized T twice, and
then click on the ### link underneath the text area, ### is not
inserted into the form, as i would like, but is rather inserted
outside of the form.

if i comment out the function that is responsible for the
highlighting, it works just fine, although i can't see, for the life
of me, what in the highlighting function is causing this...

any help would be appreciated - thanks! :)
Jul 20 '05 #1
1 2311
yawnmoth wrote:
say i have a form where, if a user clicks in it, all the text is
highlighted, and where, if a user clicks on a button outside of the
form, a certain text string is inserted where the cursor in the
textarea is.
This sounds like javascript, and thus off topic for this group.
here's a working demonstration:

http://www.geocities.com/terra1024/error-forms.html
As I guessed, this is a javascript question.
any help would be appreciated


Ask in a javascript group (after checking their faq, etc.).

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #2

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

Similar topics

6
3146
by: Matt | last post by:
I have a textarea that is populated from a blob within a database. Everytime the data is pulled, however, there is always a lot of leading space characters before the actual text. It is not in the database this way, so how might I specify more formatting parameters within the textarea? Matt Williams
9
9330
by: Hal Halloway | last post by:
I want a text editor inside a form's textarea, So I would see html markup and html entities - just like a text editor. I also would want to be able to edit it all just like a text editor - this is done in PHPMyadmin for example...is there an easy way to do this? In a way i'm asking the browser to suspend rendering markup.
4
23696
by: Chris Sharman | last post by:
I haven't specified fonts, leaving the user to have their chosen font. However, different tags render in different default fonts: text, input, & textarea all different from one another. I guess this is normal behaviour, but it looks poor, and I don't want our website to look that way (to out of the box browsers). How would I set...
5
12125
by: Jesper Rønn-Jensen | last post by:
I have a textarea that must be limited to 70 characters. No big deal -- at least so I thought. * Textarea must not exceed 70 characters * Exceeding content must be cut off * Must work on input by keyboard (keypress, keyup events) * Must work on pasted input from context menu * Must work on pasted input via CTRL+V and similar * Must work on...
16
2874
by: Martin Trautmann | last post by:
Hi all, I just had a problem where Mozilla 1.6 did not accept a XHTML 1.0 page that contained <p><textarea cols="50" name="prod_prob_description" rows="4" /></p> It did not accept the end tag />, but selected everything after til the EOF as text within the textarea.
2
1324
by: Ady | last post by:
I'm developing a kind of chat facility whereby a user can type text in a box at the top and submit it to a central database. At the bottom there is a textarea which contains a running history of both the users comments and comments intended for the user. I've had to use two frames here because whenever there is a refresh on the page (or a...
4
4235
by: TJS | last post by:
can the rows and columns of a textarea element with an id be changed on the fly ? if so is there an example ?
5
4543
by: bwucke | last post by:
Is there any way to scroll textarea (to the bottom row) from Javascript in Opera? The textarea.scrollTop=textarea.scrollHeight+textarea.scrollTop; approach doesn't work, and there's so many notices that it doesn't all over the net, that if there's any solution/workaround to this problem on the net, it's unfindable. Alternatively (my...
4
10403
by: Werner | last post by:
Hello, how can fill automatically a textarea when opening a webpage. I want to do this by a function that has been raised in js file. thx
2
2866
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 selectie ingesloten door \ en \, net als hier op GoT. Wat ik nu probeer is, om de B-knop uit de toolbar te laten oplichten als de cursor op een...
0
7468
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7401
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7656
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7757
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5972
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5329
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4945
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3443
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1884
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.