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

Home Posts Topics Members FAQ

How can textarea's text with return

Hello,
<%@ Language=VBScript %>
<%
Response.Write "<FORM name=form1>"
Response.Write "<TEXTAREA rows=2 cols=20 id=textarea1
name=textarea1></TEXTAREA>"
%>
<Script language=JavaScript>
document.form1.textarea1.value="ABC"&chr(13)&"DEF"
</Script>
<%
Response.Write "</FORM>"
%>
I want textarea1 shows:
ABC
DEF
But textarea1 shows none.
Thank you
Jul 19 '05 #1
2 1512
try \n instead of chr(13).

<FORM name=form1>
<TEXTAREA rows=2 cols=20 id=textarea1 name=textarea1></TEXTAREA>
<Script language=JavaScript>
document.form1.textarea1.value="ABC\nDEF"
</Script>
</FORM>

The reason for this is because you are processing the JS outside the ASP script.

Hope this helps.

Stu

"Jack" <si*****************@noyahoo.co.jp> wrote in message news:#x**************@tk2msftngp13.phx.gbl...
Hello,
<%@ Language=VBScript %>
<%
Response.Write "<FORM name=form1>"
Response.Write "<TEXTAREA rows=2 cols=20 id=textarea1
name=textarea1></TEXTAREA>"
%>
<Script language=JavaScript>
document.form1.textarea1.value="ABC"&chr(13)&"DEF"
</Script>
<%
Response.Write "</FORM>"
%>
I want textarea1 shows:
ABC
DEF
But textarea1 shows none.
Thank you



Jul 19 '05 #2
Thank you very much!

Jul 19 '05 #3

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

Similar topics

4
by: Doug van Vianen | last post by:
Hi, I am working on an Applet which provides some mouse practice for new computer users in our local seniors' computer club. The applet contains several cards, in a card layout, which are...
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
1
by: trihanhcie | last post by:
Hi I have several textarea in the same page. I would like to count the words in each textarea without any interaction with each other. Here's the code I used for the count : <script...
4
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...
1
by: Garry Jones | last post by:
I have been using this code for sometime. I can use it to show the user how many remaining characters are reamaining in a text area. Now I need to develop the code and dont know where to start. ...
16
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...
8
by: Sandy Tipper | last post by:
I have never had a textarea content change, in any browser. On several different projects. With javascript enabled (other stuff works.) I have read lots, and everyone says it should work. Can...
7
by: =?ISO-8859-1?Q?=22=C1lvaro_G=2E_Vicario=22?= | last post by:
I need to emulate the missing "maxlegth" attribute in "textarea" fields but all my Google searches either lead to obsolete scripts that overwrite the "value" property (thus losing caret position)...
15
by: globalrev | last post by:
i have a translator-program for the robbers language. i want the user to input into the topwindow and then display the encryption or decryption in the bottom window. i am currently trying to...
3
by: sandromani | last post by:
Hi all, I am writing a webbased notepad and want to include syntax-coloring. The approach I have used is to set the font color and background color of the textarea to transparent, and place the...
0
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
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...
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
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,...
0
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
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.