2 Replies - 38356 Views - Last Post: 30 April 2010 - 01:23 AM

#1 karen  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 04-November 05

show/hide text area

Posted 04 November 2005 - 04:11 AM

maybe somebody can help me??

I have a textarea along with an instruction to the user that I want to appear when the user clicks the "disagree" option button.

Here's my code so far:

<input type=radio name=mytest value=mytest2 onfocus='document.getElementById("myarea").style.visibility = "hidden";'> I agree </input><br>

<input type=radio name=mytest value=mytest3 onclick='document.getElementById("myarea").style.visibility = "visible";'> I disagree </input><br>

<textarea id=myarea Style = "visibility:hidden" > Please us why? </textarea>

The textarea appears/disappears nicely depending on which button is clicked...

But my problem is I want the "please tell us why" instruction to appear and disappear with the textarea but cannot figure out how to do this....

Is This A Good Question/Topic? 0
  • +

#10 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1875
  • View blog
  • Posts: 20,284
  • Joined: 17-March 01

Re: show/hide text area

Posted 04 November 2005 - 08:16 AM

I assume you want "Please tell us why?" as a label, not text inside the text area.

I would suggest putting a div around the text and text area.

Something like this:
<div id="myarea" style="visibility:hidden">[text area and label here]</div>

Was This Post Helpful? 1

#11 Guest_a*


Reputation:

Re: show/hide text area

Posted 30 April 2010 - 01:23 AM

test
tes
Was This Post Helpful? 0

Page 1 of 1