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

Home Posts Topics Members FAQ

How to select the first line in textarea?

Hi,
Anyone how could I select the first line in the <textareaafter page
load?
I have done after clicking on the textarea, but this isn't good I must
have after load :(

bye
Jan 27 '08 #1
4 3274
On Jan 27, 1:52*pm, laziers <lazi...@gmail.comwrote:
Hi,
Anyone how could I select the first line in the <textareaafter page
load?
I have done after clicking on the textarea, but this isn't good I must
have after load :(

bye
How did you do it by clicking?

Just do the same thing, except instead of onclick, do
onload="whatEverYouWerDoingBefore()"

But what will be in the textarea when the page loads?
Jan 27 '08 #2
1. <body onload="...">
2.http://www.google.com/search?q=textarea+line+select
ok thats fine, but I cant do this in body :(

Jan 27 '08 #3
On Jan 28, 7:58 am, laziers <lazi...@gmail.comwrote:
1. <body onload="...">
2.http://www.google.com/search?q=textarea+line+select

ok thats fine, but I cant do this in body :(
Do you not have control of the body element directly? If not, perhaps:

window.onload=function()
{
...
}
Jan 27 '08 #4
On 27 Sty, 23:18, "liamge...@gmail.com" <liamge...@gmail.comwrote:
On Jan 28, 7:58 am, laziers <lazi...@gmail.comwrote:
1. <body onload="...">
2.http://www.google.com/search?q=textarea+line+select
ok thats fine, but I cant do this in body :(

Do you not have control of the body element directly? If not, perhaps:

window.onload=function()
{
* * ...

hmm maby this will work, thx
Jan 28 '08 #5

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

Similar topics

5
by: Ganco | last post by:
We have a dropdown combobox, where some of the text is wider than the textarea. I cannot set the width of the SELECT any higher due to design restrictions on the company website. When clicking...
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
9
by: Prowler | last post by:
In our current application we have a page whose sole purpose for existence is to permit the user to select from a list (subsequent to our login page). We would like to have the list drop down...
5
by: joelbyrd | last post by:
Didn't know exactly where to post this, but: How do I get line breaks in a textarea? I'm pulling text from a database, and this text definately has line breaks in it, because I replaced all the...
4
by: devine | last post by:
Hi All, I am VERY new to Javascript. I have been provided with some code, which will enable me to hide/show a text area and change a submit button dependant on a check box. <!DOCTYPE html...
1
by: Jan Doggen | last post by:
Hello all, I have a SELECT like this (the 'alert()s are temporary): <FORM method="POST" action="/scripts/runisa.dll?OVB2.132964:PGSPLITVACAFMELDEN:1095144287.9159" id="hulpform"...
6
by: Vortexmind | last post by:
Hi all I was wondering if this is possible in Javascript. I want to make a bookmarklet. When a user launches it, it tells the user to select an element in the page (for example a textarea) with...
16
by: Richard Maher | last post by:
Hi, I have this Applet-hosted Socket connection to my server and in an ONevent/function I am retrieving all these lovely rows from the server and inserting them into the Select-List. (The on...
1
by: impostor | last post by:
I have a query that works fine with single state selections but I need to be able to query based on multiple state selections in a multiple select list and populate the second textarea on the same...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...
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
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
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: 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.