473,406 Members | 2,698 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,406 software developers and data experts.

textarea to appear/disappear

Ike
How can I make a textarea appear or disappear at the click of a button or
link?

Thanks, Ike
Jul 20 '05 #1
4 2882
Jon
I have a link in a cell, for the cell I have:

<td onMouseOver="document.all.**CELLNAME**.innerHTML=' **YOURTEXT**';"
width="??" align="??">

This changes the cell's content depending on the link hovered over

Jon

"Ike" <rx*@hotmail.com> wrote in message
news:oX****************@newsread1.news.atl.earthli nk.net...
How can I make a textarea appear or disappear at the click of a button or
link?

Thanks, Ike

Jul 20 '05 #2
I'm outdated regarding to DHTML issues.
However you can change the textarea's style and set its 'visibility' to
'hidden'
Given that you had an id for your text area.

--
Elias
"Ike" <rx*@hotmail.com> wrote in message
news:oX****************@newsread1.news.atl.earthli nk.net...
How can I make a textarea appear or disappear at the click of a button or
link?

Thanks, Ike

Jul 20 '05 #3
"Ike" <rx*@hotmail.com> writes:
How can I make a textarea appear or disappear at the click of a button or
link?


Try:
---
<form action="...something...">
....
<textarea name="foo">some text</textarea>
....
<input type="button" value="show/hide"
onclick="var elemStyle = this.form.elements['foo'].style;
elemStyle.visibility =
(elemStyle.visibility != '' ? '' : 'hidden');">
....
</form>
---

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #4
On Fri, 02 Jan 2004 14:08:20 +0000, Ike wrote:
How can I make a textarea appear or disappear at the click of a button or
link?

Thanks, Ike


function hideElement( id )
{
var gebID = document.getElementById || document.all || NULL;
if( gebID )
gebID( id ).style.display = 'none';
}
function showElement( id )
{
var gebID = document.getElementById || document.all || NULL;
if( gebID )
gebID( id ).style.display = '';
}

....

<textarea id="foobar"></textarea>
<button onclick="showElement( 'foobar' );">Show Textarea</button>
<button onclick="hideElement( 'foobar' );">Hide Textarea</button>

..style.display = 'none'; makes the text area act exactly like a <input
type="hidden" />
Jul 20 '05 #5

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

Similar topics

4
by: David | last post by:
It's sad to say, but when using the AOL web site, like to send an email, they have a nifty capability such that when a window is resized, the textarea where the message is input expands not only...
3
by: Sunil Kulkarni | last post by:
I need to validate my TextArea as follows: 1) IT SHOULD ALLOW FOR ONLY 5 COLUMNS 2) IT SHOULD ALLOW ONLY 65 CHARACTERS PER ROW I need some kind of a JS validation for the same. I have tried...
3
by: Gram | last post by:
Hello, Can anyone help me with the following, or point me to a site that can help: I have a list of words in a List and I want a user to be able to select several words from this list, hit a...
4
by: Dennis Allen | last post by:
Hi. I hope someone here can help. I'm webmaster for a local astronomy club. Just went over our web site. Have validated every htm file on the site except:...
1
by: dalei | last post by:
I like to make foreign letters to appear in the textarea. For instance, when typing the letter 'a' on the keyboard, the Japanese letter &#+12449; would appear in the textarea. Could somebody...
1
by: Tamir Kamara | last post by:
Hi, I have a page with several server controls (textboxes, datagrid, ...) which are positioned absolutely from the right of the page (like RIGHT: 25px; POSITION: absolute;). that works well if...
2
by: mattrapoport | last post by:
Hello, I am have a div and inside of that div I have a textarea. There is nothing else in the div. The text in the textarea will come from a database so it needs to be able to wrap and grow as...
6
by: Eric Layman | last post by:
Hi, I have fields from textareas. With a click of a button, php is able to grab these fields and by using header(), convert the output to Ms Word doc. But the outcome of the word doc...
2
by: ivowel | last post by:
dear experts: is it possible to define in plain html (perhaps with css) a textarea in a form that expands over the entire width of a browser window? sincerely, /iaw
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?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.