473,387 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Resizing of the TextArea on border or scrollbar

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 <tdor scrollbars of the textareas only then resize script
should get called ?

Please help !

Cheers
Nick
Jun 27 '08 #1
1 1593
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

"Nick" <na*****************@gmail.comwrote in message
news:a8**********************************@w7g2000h sa.googlegroups.com...
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 <tdor scrollbars of the textareas only then resize script
should get called ?

Please help !

Cheers
Nick

Jun 27 '08 #2

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

Similar topics

2
by: Mike Labman | last post by:
This is more of an HTML/CSS question, but I figure someone in here might know. I'm using in the stylesheet: BORDER-RIGHT: none; BORDER-TOP: none; BORDER-LEFT: none; BORDER-BOTTOM: none;...
2
by: Mike | last post by:
I need a little HTML/CSS help for cross-browser/cross-platform issues. I'm using a few stylesheet properties to hide the borders and scrollbar on a TEXTAREA object as follows: BORDER-RIGHT:...
19
by: Eva | last post by:
Hi, I'm really really really new to javascripts and so i couldn't really comprehend thoroughly on the the previous posts regarding this issue. Anyways, I'm setting up a picture album site....
2
by: musicmouse | last post by:
Happy new year to you all, I have a problem with the css settings for the horizontal scrollbar of a textarea. When I look at my textarea's in Internet Explorer (I use 5.5) I see only a...
0
by: =?Utf-8?B?cGF0cmlja2RyZA==?= | last post by:
Hi everyone! I have these three questions and though to post them in a single thread: 1) I have created a textarea: <textarea id="txtCards" cols="50" rows="15" runat="server" wrap="virtual"...
9
by: dli07 | last post by:
Hello, I'm trying to convert a piece of code that creates a dynamic vertical resizing bar in a table from internet explorer to firefox. It's based on a post from...
8
by: honey99 | last post by:
Hi! i have a problem with textarea scrollbar in firefox.In FF it is taking horizantal scrollbar by default??but in IE vertical scrollbar is displaying correctly..I want vertical scrollbar in FF and...
1
by: Nick | last post by:
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.