Resizing of the TextArea on border or scrollbar

  • Thread starter Thread starter Nick
  • Start date Start date
N

Nick

Hi,

I have created a html page from Java and I have added a .js file which
can resize a TextArea inside the html on mousedown event.

<script src="C:\temp\resize.js"> </script>
<table> <tr><td onmousedown="javascript:resize('trinput',event)">
<TEXTAREA NAME="input" id="trinput" COLS=40 ROWS=60>
my textarea here
</TEXTAREA>
</td>
</tr>
</table>

But now when I click on amny of the area of tes TextArea the textarea
starts resizing.

Can I do something like only when the mouse is down over the borders
of the <td> or scrollbars of the textareas only then resize script
should get called ?

Please help !

Cheers
Nick
 
You need to modify your .js file to do that.

Based on the current size and location of the textbox you can calculate the
position of the texteara's borders. So all you need to do is modify your
resize script to check that the mouse is currently over the border before
you begin resizing.

Hope that helps,
Fernando L Rodriguez, MCP
 
Back
Top