hi,
iwant to add dynamically some rows in same textarea when a button of
addRows is clicked.
like,if i have 2 rows in a textarea then after clicking a button the
rows must be increased to 4.
help me soon.
thanks
*** Sent via Developersdex http://www.developersdex.com ***
|
|
0
|
|
|
|
Reply
|
garima
|
9/20/2005 3:20:09 AM |
|
Hi garima,
garima puri wrote:
> hi,
> iwant to add dynamically some rows in same textarea when a button of
> addRows is clicked.
> like,if i have 2 rows in a textarea then after clicking a button the
> rows must be increased to 4.
> help me soon.
> thanks
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
Here is how i do it.
<html>
<body>
<textarea id="txtarea" cols="30" rows="5"></textarea>
<input type="button" value="Increment Rows" onClick="moreRows()">
<script language="javascript" type="text/javascript">
function moreRows() {
document.getElementById('txtarea').rows += 2;
}
</script>
<body>
</html>
-- Peroli Sivaprakasam
|
|
0
|
|
|
|
Reply
|
Peroli
|
9/20/2005 3:48:23 AM
|
|
> hi,
> iwant to add dynamically some rows in same textarea when a button of
> addRows is clicked.
> like,if i have 2 rows in a textarea then after clicking a button the
> rows must be increased to 4.
function addRow(){
document.getElementById("your_textarea_ID").rows+=2;
}
|
|
0
|
|
|
|
Reply
|
McA
|
9/20/2005 2:26:34 PM
|
|