473,657 Members | 2,550 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A question about textarea

the code is like following:
<textarea cols=40 rows=10 name=n style="overflow :auto"this is a test
about textarea and see how it works..... </textarea>
can i assign a variable to rows based on my contents length? or
javascript has any internal attribute i can use?
TIA.
st

Nov 11 '07 #1
2 2079
VK
On Nov 11, 5:50 pm, aaabb...@hotmai l.com wrote:
the code is like following:
<textarea cols=40 rows=10 name=n style="overflow :auto"this is a test
about textarea and see how it works..... </textarea>
can i assign a variable to rows based on my contents length? or
javascript has any internal attribute i can use?
Do you want to make it once on page loading or at any time after page
loaded?

Nov 11 '07 #2
On 11 11 , 6 58 , VK <schools_r...@y ahoo.comwrote:
On Nov 11, 5:50 pm, aaabb...@hotmai l.com wrote:
the code is like following:
<textarea cols=40 rows=10 name=n style="overflow :auto"this is a test
about textarea and see how it works..... </textarea>
can i assign a variable to rows based on my contents length? or
javascript has any internal attribute i can use?

Do you want to make it once on page loading or at any time after page
loaded?
It is html builder to create a html file. The reason is my content
change often. sometimes may be just
one line or two, if set row=10, it wast more space.
what I basic idea is use string length to check my contents (may use a
function to check it), then based on that assign a var. to rows. Is
it possible? also if the content is longer that 10 rows, use
scrollbar.

Nov 11 '07 #3

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

Similar topics

1
3555
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
12133
by: Jesper Rønn-Jensen | last post by:
I have a textarea that must be limited to 70 characters. No big deal -- at least so I thought. * Textarea must not exceed 70 characters * Exceeding content must be cut off * Must work on input by keyboard (keypress, keyup events) * Must work on pasted input from context menu * Must work on pasted input via CTRL+V and similar * Must work on pasted input via browsers menu>Edit>Paste * Must work in Mozilla + IE and coded via W3C standards
4
4242
by: TJS | last post by:
can the rows and columns of a textarea element with an id be changed on the fly ? if so is there an example ?
6
5977
by: wperry1 | last post by:
I am writing a small database utility to catalog all of my favorite ASM/JS/VBS... functions and scripts on an asp page. Everything is going smoothly except for one thing that I can't quite seem to think my way around. I am using a <textarea> to display the code but some of my scripts have <textarea> tags in them and when the </textarea> tag is entered, it closes my <textarea> and the rest of the code ends up outside of the textarea.
4
7776
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 find the text and select it using the function below, BUT I can't figure out how to have the textarea automatically scroll to the selection in Firefox. Any ideas or suggestions? function search(needle,haystack,start) { var element =...
3
4924
by: MikeK | last post by:
Ok, I've been noodling with this for several days now and I'm starting to go crazy. Does Apple's Safari browser support drag events on Textarea elements? The few specs and docs I've found seem to indicate that it does but I can't get it to work for the life of me. I've tired everything I can think of to try get notifications for the events: ondragenter ondragleave ondragover ondrop
5
4767
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 test="@READONLY"> <xsl:attribute name="READONLY"><xsl:text>READONLY</xsl:text></ xsl:attribute> </xsl:if> <xsl:value-of select="."/> </TEXTAREA>
2
2469
by: Slick50 | last post by:
I am about ready to finally give up on CSS and fall back to tables. Positioning is becoming too frustrating for the novice with CSS alone... I have a simple form. Conceptually I divide up each input of user information into rows. On one particular row I want a label to be displayed on the left, a <textareainput in the middle, and some text on the right - all on the same line. This all seems to work fine until the text on the right...
3
6737
by: =?GB2312?B?1qP2zrrA?= | last post by:
hi all, i need to covert the utf8 character to gbk,is that possible?Any idea will be appreciate.
0
8425
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8326
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
8743
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
8522
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
8622
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...
0
5647
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4333
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2745
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 we have to send another system
2
1973
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.