473,790 Members | 2,554 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TextArea insert text in specific column


I am trying to insert text in a text area. I need to insert one set of
values on the left side of the text area and have corresponding values
on the left side of the text area in an even column.
How do I specify which column in a text area to insert text?
document.textfo rm.textarea.col[10].value == "put it here"
If not possible, then can I insert text left aligned then insert text
right aligned on the same row?
Lloyd

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #1
2 3265
Lloyd wrote:
I am trying to insert text in a text area. I need to insert one set of
values on the left side of the text area and have corresponding values
on the left side of the text area in an even column.
How do I specify which column in a text area to insert text?
document.textfo rm.textarea.col[10].value == "put it here"
If not possible, then can I insert text left aligned then insert text
right aligned on the same row?
Lloyd

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Textarea does not have rows and colums. It is continious text with line
breaks that depend on the width of textarea element.
See how close this comes to whatever you are trying to do:
www.vladdy.net/demos/textareainsertion.html

--
Vladdy
http://www.klproductions.com
Jul 23 '05 #2
Thanks for the information, I hadnt considered that.
There is a way to set bookmarks using the createTextRange method, which
I would imagine is what you did in your example. However I solved the
problem by counting the number of characters in the first insertion and
then adding the appropriate spaces with respect to the total number of
cols in the textarea.
Thanks
Lloyd

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #3

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

Similar topics

6
11602
by: Max | last post by:
i want to insert a predefined string in a textarea when i right click on the mouse. i need to do it in internet explorer and mozilla.
4
11200
by: dekern | last post by:
I have been trying to set the default text value of a TextArea element for about a day now without any luck. Similar to the code used to set the Text field below I would like to use the returned (for lack of a better term) value in a TextArea element ie. {TITLE}. this works: <input readonly="true" value="{TITLE}" name="titleedit" size="50" maxlength="255" class="detaileditentry">
4
16725
by: Csaba Gabor | last post by:
What I'd like to do is to be able to set the font of a textarea element to the same font that another element is using (say, for example, an <INPUT type=text ...> element, but if that's a no go, then a generic element's font will do OK, too. What's the correct way to do this, please (so that it will also work for IE 6)? The motivation for this is that I have some text on the screen and I want to insert a textarea element between the...
6
9293
by: Thirteenva | last post by:
I've encountered a bug in IE that I can not find a fix to. Maybe someone can help me out here. I have a 3 column css layout. The middle column is fluid and expands as the browser is resized. I have a textarea who's width is 100%. This text box resides in the middle column. When the page renders in IE the textarea is sized to 100% of the middle div, the way it should be. However, when i start typing in this box it immediately expands...
5
2652
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 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...
7
30383
by: Paul Gorodyansky | last post by:
Hi, Say I have a text in my TEXTAREA box - 01234567890 I want - using script - insert say "abc" in the middle. Works almost OK in Internet Explorer (with one problem) based on their example at http://msdn.microsoft.com/library/en-us/dnwebteam/html/webteam12032001.asp in the chapter "O Cursor, Where Art Thou".
8
4257
by: yerk5 | last post by:
Does js have some way of doing what I want here: I want to paste a multiline block of text into a TEXTAREA form field, and there is data in the block of text that I want to extract into a variable. It's always going to be as the same column and row position of the block of text. For example, I want to extract the text from the block from say Line 3, column 4 through Line 3, column 15 into a variable.
16
2856
by: Jen | last post by:
Hi. I have this problem that I think should be easy but have been struggling with this for days. I have a list based on a recordset from a database. This list consists of records meeting a certain criteria and at the bottom of this list i have a button that inserts all these records to a´nother table in the database. So long everything's ok. BUT, at the top of this list I have a textarea that the user can write down some text to be put...
0
9512
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10413
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10200
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10145
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9986
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7530
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3707
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.