how to hide radio button and text area

i want to hide every object that appears in the <tr> and </tr> tags, including Textboxes, radiobuttons and textarea.
i found that i can hide text boxes by using type="hidden" but this this does not apply on radiobuttons and text area. as radiobuttons already have type="radio" and text area do not hide after using type="hidden".

I want every thing present there but hidden. i can cut off the normal text but not the input objects. please take me out of this problem.
shafiqraoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

seanpowellCommented:
Use the disabled property:

<form>
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td><input type="text" name="mytextbox" size="10" disabled></td>
    <td><input type="radio" name="myradiobutton" value="circle" disabled></td>
    <td><textarea name="mytextarea" cols="10" rows="3" disabled></textarea></td>
  </tr>
</table>
</form>
0
seanpowellCommented:
I may have misunderstood your intent - so you want a textbox, radio button and textarea that no one can see - to pass information into another form/page, etc. ?
0
ZontarCommented:
Do you mean you're wanting to hide form elements that were previously shown?

Give the <tr> an id such as <tr id="myTR">

then you can hide the <tr> with a button:

<input type="button" value="Hide Row" onclick="document.getElementById('myTR').style.display = 'none';">

which will not leave any space for the row, or

<input type="button" value="Hide Row" onclick="document.getElementById('myTR').style.visibility = 'hidden';">

will will hide the contents of the row, but not remove the space it takes up in the page.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

prashantuchilCommented:
Hi,

    i think u could simply put all the things u want to hide in a <div> tag ... and hide the div.
0
ZontarCommented:
>  i think u could simply put all the things u want to hide in a <div> tag ... and hide the div.

Why use the extra tag when it's not necessary? Just hide the table row.

What exactly are you trying to do, anyway, shafiqrao?
0
jaysolomonCommented:
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!--
function toggle(fObj,divRef){
      var el = document.getElementById(divRef);
      el.style.display = (el.style.display == "none")?"":"none";
      fObj.value = (fObj.value == "Show")?"Hide":"Show";
}
// -->
</script>
</head>
<body>
<form name="form1" method="post" action="">
<table width="100%" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td><input type="button" name="btn" value="Show" onclick="toggle(this,'radios');"></td>
        <td>&nbsp;</td>
  </tr>
  <tr id="radios" style="display: none;">
    <td>
      yes
      <input type="radio" name="rad1" value="yes">
      no
      <input type="radio" name="rad1" value="no">
      </td>
      <td><input type="text" name="text1"></td>
  </tr>
</table>
</form>
</body>
</html>
0
ZontarCommented:
Looks like the "just hide the TR" camp received another vote. ;)
0
ScotterMonkeyCommented:
<TEXTAREA id='m_description' NAME='m_description' COLS='84' ROWS='15' style="display:none"></textarea>
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.