473,491 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How Can I see Update info into my TextArea and Scrolling???

4 New Member
I have a TextArea and there I want to write my tracefile info .... but I want
to see the scrolling automatically and to see the last line of my tracefile info
within this TextArea without scrolling.

Here is my HTML file ...

FORM name="TraceFile">
<TextArea Name = "commentbox" ROWS="8" COLS="70"></TextArea>


Here is my JavaScript function

function print_log(line) {
// Display the TraceFile info into the TextBox
document.LogFile.commentbox.value = document.TraceFile.commentbox.value + line + "\n";
}



Could you pls anybody give me the idea how I can I solve this problem?
Jan 8 '07 #1
1 2260
b1randon
171 Recognized Expert New Member
I have a TextArea and there I want to write my tracefile info .... but I want
to see the scrolling automatically and to see the last line of my tracefile info
within this TextArea without scrolling.

Here is my HTML file ...

FORM name="TraceFile">
<TextArea Name = "commentbox" ROWS="8" COLS="70"></TextArea>


Here is my JavaScript function

function print_log(line) {
// Display the TraceFile info into the TextBox
document.LogFile.commentbox.value = document.TraceFile.commentbox.value + line + "\n";
}



Could you pls anybody give me the idea how I can I solve this problem?
You're not going to get the text area to scroll. It just doesn't happen. What you can do is either a) clear the text area out and replace the contents or b) prepend instead of appending the newest entry. The latter is probably better and would look like this:
Expand|Select|Wrap|Line Numbers
  1. function print_log(line) {        
  2. // Display the TraceFile info into the TextBox
  3. document.LogFile.commentbox.value = line + "\n" + document.TraceFile.commentbox.value;
  4. }
  5.  
Hope that helps.
Jan 8 '07 #2

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

Similar topics

7
11791
by: Ralph Freshour | last post by:
I'm trying to add images to a TEXTAREA tag (in my PHP web page) using the usual image tag: <INPUT TYPE="image" etc. But the images are not showing up in the TEXTAREA but rather outside, below...
0
2312
by: Krzysztof Fink-Finowicki via .NET 247 | last post by:
I have problem with TEXTAREA HTML tags in my Web application (MSIE 6.0). User fills-in content of TEXTAREA on HTML dialog window. After accepting, content of TEXTAREA from dialog window is...
6
4557
by: stuart | last post by:
I have two textareas on a HTML page. If a user scrolls in one textarea I want the other textarea to scroll as well. In otherwords I want both textareas to scroll up and down in unison. Can...
7
4550
by: Dean Trower | last post by:
Does anyone know a clean method of preventing scrolling altogether in a TEXTAREA (i.e. ensuring the user CANNOT type more text than fits inside the box area)? I'd like to know how, if so... It...
5
4525
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...
8
52981
by: Mark D. Smith | last post by:
Hi I have googled but not found a solution to wordwrap in a textarea using firefox/netscape. is there a style sheet solution or am i stuck with not being able to force wrapping in a textarea...
4
7737
by: Keith Bentrup | last post by:
Hi all, I wrote a simple search function to find text in a textarea where not all the text is visible (ie. the text box displays 10 lines but there may be more than 1000 lines to search). I can...
2
11464
by: Mike Brophy | last post by:
Here's my problem: I need to present text in a scrolling textarea such that a checkbox is not enabled until the user has scrolled to the very last line of the text using the vertical scrollbar. ...
4
1933
by: empiresolutions | last post by:
I need to show PHP and HTML code inside of a textarea for people to copy out into their own site. I can get code to work correct without PHP code in it like htmlspecialchars("<iframe src...
0
7118
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
6980
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...
1
6862
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...
0
5452
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,...
1
4886
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...
0
4579
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...
0
3087
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
282
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...

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.