473,406 Members | 2,633 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,406 software developers and data experts.

TextArea Highlight & delete problem

It seems there is a difference between

1)highlighting text in a textarea then deleting it and

2)pressing the delete button multiple times.

When I delete using method 2. And send the contents of the textarea to a java method that takes a string(ie the textarea string) and updates its local string variable. The local string variable is unchanged. It appears deleting using method 2 does not send an empty string??

Please help
Dec 1 '06 #1
2 3709
AricC
1,892 Expert 1GB
I'm not really clear what you mean???? Post an example.
Dec 1 '06 #2
I have a java class that has a Sting variable called formData.

I have a method in this class called setFormData. this method takes a string eg n as input -setFormData(n string). It then updates the the formData variable with string n.

eg setFormData(string n){
formData =n
}



I send textarea content to the above method eg:
setFormData(textarea content)
This is suppose to update formData variable. However if I delete all text in my textarea using highlight and delete. The formData variable does not update to reflect.

If I delete all text in the textarea by pressing delete for each charecter. formData is updated to an empty string.
Dec 2 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Dan Williams | last post by:
Does anyone know if its possible to get the line number of a textarea form element when a user clicks on a specific line, and hence highlight it? If so, can you point me in the right direction of...
5
by: yawnmoth | last post by:
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...
1
by: Volt | last post by:
is there any way to select and mark part of text in textarea by regular expression? i need to select the first string in textarea whitch is like xxxxx,xxx where x is any character
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"...
11
by: Les Paul | last post by:
I'm trying to design an HTML page that can edit itself. In essence, it's just like a Wiki page, but my own very simple version. It's a page full of plain old HTML content, and then at the bottom,...
6
by: Tony | last post by:
The w3schools HTML tag reference for <textarea> http://www.w3schools.com/tags/tag_textarea.asp says that the attributes 'cols' and 'rows' are REQUIRED attributes for the textarea tag. Looking at...
1
by: tranky | last post by:
Hola boys, i've a question for you! It's possible to highlight some text inside a textarea? (not all text, but a portion!) For example, i've this text inside a textarea. INSERISCI TESTO i...
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...
5
by: a113n | last post by:
I have the following XSL code to handle textareas: <!-- Match TEXTAREA --> <xsl:template name="TEXTAREA" match="TEXTAREA"> <TEXTAREA ROWS="{@ROWS}" COLS="{@COLS}" NAME="{@NAME}"> <xsl:if...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.