469,915 Members | 2,634 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,915 developers. It's quick & easy.

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 2772
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Sunil Kulkarni | last post: by
3 posts views Thread by Gram | last post: by
4 posts views Thread by Dennis Allen | last post: by
1 post views Thread by dalei | last post: by
1 post views Thread by Tamir Kamara | last post: by
2 posts views Thread by mattrapoport | last post: by
6 posts views Thread by Eric Layman | last post: by
2 posts views Thread by ivowel | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.