Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Add text into TEXTAREA


Message #1 by "Biljardt, Richard" <rbiljard@f...> on Fri, 8 Dec 2000 05:55:23 -0500

I have text in a textarea and I add text to it with no problem. What I now

want to do is add the new lines on the top of the existing text instead of

at the end of the text.



Can somebody help me in this?



Regards,

Richard

Message #2 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Fri, 8 Dec 2000 11:08:20 -0000
var sNewText = "New Text to add in";



var sText = oTextArea.text;



oTextArea.text = sNewText + sText;





-----Original Message-----

From: Biljardt, Richard [mailto:rbiljard@f...]

Sent: Friday, December 08, 2000 7:18 PM

To: ASP Web HowTo

Subject: [asp_web_howto] Add text into TEXTAREA







I have text in a textarea and I add text to it with no problem. What I now

want to do is add the new lines on the top of the existing text instead of

at the end of the text.



Can somebody help me in this?



Regards,

Richard



---

MaximumASP offers enhanced hosting solutions on the Windows 2000 platform.

Dedicated processor, RAM, and server resources provide dedicated server

performance at virtual server prices. Commercial components provided; custom

components allowed.




$subst('Email.Unsub')



________________________________________________________________________

Scottish Enterprise Network

http://www.scottish-enterprise.com



This message is sent in confidence for the addressee only.

It may contain legally privileged information. The contents are not to

be disclosed to anyone other than the addressee. Unauthorised recipients

are requested to preserve this confidentiality and to advise the sender

immediately of any error in transmission.





Message #3 by "Biljardt, Richard" <rbiljard@f...> on Fri, 8 Dec 2000 07:36:56 -0500
Thanks for this answer but I think I have to explain what I am doing.



I read text from a database and display it in a TEXTAREA. I add text into

this TEXTAREA and update the database with this updated textarea.



What I want is that the new added lines are on top of the old text. When

clicking on the textarea it will go to the left top corner, just what I

want. BUT, I create a kind of timestamp and that string I past into the

textarea when clicking on it. What happens is that the timestamp is added on

the end of the existing text and the pointer moves to the left top corner

(start place). 

What I want is that this timestamp is added at the begin of the existing

text. 

Does somebody have a clue?



-----Original Message-----

From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]

Sent: Friday, December 08, 2000 12:08 PM

To: ASP Web HowTo

Subject: [asp_web_howto] RE: Add text into TEXTAREA





var sNewText = "New Text to add in";



var sText = oTextArea.text;



oTextArea.text = sNewText + sText;





-----Original Message-----

From: Biljardt, Richard [mailto:rbiljard@f...]

Sent: Friday, December 08, 2000 7:18 PM

To: ASP Web HowTo

Subject: [asp_web_howto] Add text into TEXTAREA







I have text in a textarea and I add text to it with no problem. What I now

want to do is add the new lines on the top of the existing text instead of

at the end of the text.



Can somebody help me in this?



Regards,

Richard











Message #4 by Imar Spaanjaars <Imar@S...> on Fri, 08 Dec 2000 14:17:24 +0100
I think that what you want could be done by the code that Alex proposed, 

but only if you convert it to client side JavaScript.



If you post some of the code you already have, it is easier to give some 

suggestions.





Imar





At 07:36 AM 12/8/2000 -0500, you wrote:

>Thanks for this answer but I think I have to explain what I am doing.

>

>I read text from a database and display it in a TEXTAREA. I add text into

>this TEXTAREA and update the database with this updated textarea.

>

>What I want is that the new added lines are on top of the old text. When

>clicking on the textarea it will go to the left top corner, just what I

>want. BUT, I create a kind of timestamp and that string I past into the

>textarea when clicking on it. What happens is that the timestamp is added on

>the end of the existing text and the pointer moves to the left top corner

>(start place).

>What I want is that this timestamp is added at the begin of the existing

>text.

>Does somebody have a clue?

>

>-----Original Message-----

>From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]

>Sent: Friday, December 08, 2000 12:08 PM

>To: ASP Web HowTo

>Subject: [asp_web_howto] RE: Add text into TEXTAREA

>

>

>var sNewText = "New Text to add in";

>

>var sText = oTextArea.text;

>

>oTextArea.text = sNewText + sText;

>

>

>-----Original Message-----

>From: Biljardt, Richard [mailto:rbiljard@f...]

>Sent: Friday, December 08, 2000 7:18 PM

>To: ASP Web HowTo

>Subject: [asp_web_howto] Add text into TEXTAREA

>

>

>

>I have text in a textarea and I add text to it with no problem. What I now

>want to do is add the new lines on the top of the existing text instead of

>at the end of the text.

>

>Can somebody help me in this?

>

>Regards,

>Richard

>

>

>








  Return to Index