473,782 Members | 2,699 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\re size.js"</script>
<table<tr><td onmousedown="ja vascript:resize ('trinput',even t)">
<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 1615
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.com wrote in message
news:a8******** *************** ***********@w7g 2000hsa.googleg roups.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\re size.js"</script>
<table<tr><td onmousedown="ja vascript:resize ('trinput',even t)">
<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
4131
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; OVERFLOW: hidden;
2
9477
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: none; BORDER-TOP: none; BORDER-LEFT: none; BORDER-BOTTOM: none; OVERFLOW: hidden;
19
4618
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. When i click on a thumbnail or a picture, a larger picture pops up in a javascript window. But it has a space on the top and on the left of my larger pic in the pop-up window. How do i get rid of that? Also, i want the window to fit my my pic so...
2
104913
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 vertical scrollbar when the area contains a too long text. IE wil just break off the text at the limit if a single word is too long and put the next character on the next line. For me this is the desired bahaviour (those horizontal scrollbars take too...
0
1622
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" /> which is used for user editing (typing in some info).
9
5313
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 http://blogs.crankygoblin.com/blogs/geoff.appleby/pages/50712.aspx. I've also read the post on this topic by bggraphics, but he doesn't arrive at a final result. The main problem I am having is that the layerX and layerY event properties don't work. They're supposed to return the...
8
14034
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 how to avoid horizantal scrollbar in FF??check my code plz.... <TEXTAREA Name="text" rows=4 Cols="70"rows=4 Cols="70" onfocus="focuscolor(this)" onblur='javascript:blurcolor(this);' class="input" wrap="VIRTUAL"> regards
1
2794
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 onmousedown="javascript:resize('trinput',event)"> <TEXTAREA NAME="input" id="trinput" COLS=40 ROWS=60> my textarea here </TEXTAREA>
0
9474
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
10308
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9939
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
8964
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7486
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6729
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
5507
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4040
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
3633
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.