Advertisement

03.16.2004 at 02:39AM PST, ID: 20920333
[x]
Attachment Details

Javascript Show/Hide table from Radio Button

Asked by mknight9 in Web Languages/Standards

Tags: hide, javascript, table, show, radio

Hi All
The code below is not doing as I want it to. I took the code from another place and modified to suit my needs.
When Yes is Selected I want the whole table to show, but it shows is the row if the table. I placed id="laptop" on all the rows to no success. I hope someone can help.

If anyone has an alternative, it is welcome here.  Thank You

<html>
<head>

<script type="text/JavaScript">

<!--
function showlaptop(theTable)
{
      if (document.getElementById(theTable).style.display == 'none')
      {
            document.getElementById(theTable).style.display = 'block';
      }
}
//-->

<!--
function hidelaptop(theTable)
{
      if (document.getElementById(theTable).style.display == 'none')
      {
            document.getElementById(theTable).style.display = 'none';
      }
      else
      {
            document.getElementById(theTable).style.display = 'none';
      }
}
//-->
</script>

<link href="file://///Ukmhlmail1/Shared/_Design%20&%20Media/UKMHL/To%20Sort/07%20-%20UKMortgageHelpline/_root%20v2/ukmhl.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="206" border="0" cellpadding="0" cellspacing="0" style="width: 30% border: 0;">
<tr width="100%">
<td>
<input type="radio" name="pctype" value="desktop" onfocus="hidelaptop('laptop');return false;" checked />
<span class="linkswhite">No</span><input type="radio" name="pctype" value="laptop" onfocus="showlaptop('laptop');return true;"/>
<span class="linkswhite">Yes
</span></td>
</tr>
</table>

<br>
<div class="options">
<table border="0" cellpadding="0" cellspacing="0">
<tr id="laptop" style="display: none;">
  <td class="linkswhite"><div align="left">CCJ<br>    
  </div></td>
  <td>&nbsp;</td>
</tr>
<tr id="laptop" style="display: none;">
  <td class="linkswhite">When was the CCJ Registered ? </td>
  <td><input name="textfield" type="text" class="textfield"></td>
</tr>
<tr id="laptop" style="display: none;">
  <td class="linkswhite">How much was the CCJ for ? </td>
  <td><input name="textfield2" type="text" class="textfield"></td>
</tr>
<tr id="laptop" style="display: none;">
  <td class="linkswhite">Is the CCJ Satisfied ? </td>
  <td><input name="textfield3" type="text" class="textfield"></td>
</tr>
</table>
</div>

</body>
</html>
Start Free Trial
[+][-]03.16.2004 at 02:48AM PST, ID: 10605035

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.16.2004 at 02:50AM PST, ID: 10605039

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.16.2004 at 03:03AM PST, ID: 10605087

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Web Languages/Standards
Tags: hide, javascript, table, show, radio
Sign Up Now!
Solution Provided By: william_jwd
Participating Experts: 4
Solution Grade: A
 
 
[+][-]03.16.2004 at 03:14AM PST, ID: 10605130

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.16.2004 at 03:20AM PST, ID: 10605157

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.13.2004 at 12:49PM PDT, ID: 10816802

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.24.2005 at 04:01AM PST, ID: 13120446

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.24.2005 at 04:17AM PST, ID: 13120536

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.24.2005 at 04:18AM PST, ID: 13120546

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.25.2005 at 01:03AM PST, ID: 13129559

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32