473,387 Members | 1,572 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,387 software developers and data experts.

onclick issue with radio buttons

2
Hey everyone, I am having issues with my stylesheets. when my enduser clicks a radio button i have a table that produces the data i want to see. I have a redball enclosed as part of the table. Even before the user clicks the radio button automatically shows and when the radio button is selected the text the shows next to it. how can i get it so the redball shows with the rest of the table. Below is some of my code i have used. any help with be great.

thanks again

here is a piece from the table:

[HTML]<TR VALIGN="top">
<IMG SRC=".../redball.gif" VSPACE="1" ALT="*">
<FONT SIZE="2"> <A HREF="javascript:MyRxp()" onclick="javascript:tocChanged()"
>Exp Rec</A></TR>
[/HTML]
here is the javascript involved

Expand|Select|Wrap|Line Numbers
  1. function toggle(radbtn, group) {
  2.          var visSetting = (radbtn.checked) ? "visible" : "hidden";
  3.          document.getElementById(group).style.visibility = visSetting;
  4.       }
  5.  
  6.       function swap(radBtn, group) {
  7.          var modemsVisSetting = (group == "n") ? ((radBtn.checked) ? "" : "none") : "none";
  8.          var netwksVisSetting = (group == "c") ? ((radBtn.checked) ? "" : "none") : "none";
  9.          var netwksVisSetting = (group == "d") ? ((radBtn.checked) ? "" : "none") : "none";
  10.            document.getElementById("n").style.display = natVisSetting;
  11.          document.getElementById("c").style.display = constVisSetting;
  12.          document.getElementById("d").style.display = dreVisSetting;
  13.       }
Sep 25 '07 #1
1 1114
acoder
16,027 Expert Mod 8TB
Welcome to TSDN!

Please use code tags when posting code:
[CODE=javascript]
JavaScript code here...
[/code]

In your table, you don't have a td element for the table cell within the row (tr). Maybe that is causing the problem.
Sep 25 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Sarah | last post by:
Hi... I have a problem and I hope someone can help me out! I have two series of radio buttons...(call them Group A and Group B) and a Textarea. When you click on any of the radio buttons in...
5
by: Gerard van Wilgen | last post by:
I noticed that the following line of code works in IE 6 but not in Netscape 7.1: <INPUT TYPE="radio" NAME="selComb" VALUE="0" ONCLICK="alert(selComb.value)"> Nothing happens when I click on...
5
by: johnsuth | last post by:
I want to produce a trivial demonstration of dynamic modification. I thought that pressing a button might change its color. I studied O'Reillys books and successfully created the button with a...
0
by: Ryan Taylor | last post by:
Hello. I am having another issue. I need to execute some JavaScript whenever a radio button is clicked. I am currently using a RadioButtonList control to generate the radio buttons because of...
1
by: dickson.matt | last post by:
OK, I am checking the values of a radiobuttonlist with 2 values (Yes and No) using javascript: <table id="optMedTreatment"...
1
by: sluster | last post by:
I'm looking to create a search box that creates different kinds of searches based on a radio button selection. The first stage of this process for me is setting it up so clicking on different radio...
10
by: apparker | last post by:
I'm creating a new GUI for a program and it is for a medical exam. There are so many different things to ask someone during a history it wastes too much space to make checkboxes for everything so I...
1
by: sourcie | last post by:
I am changing an existing quiz found on "JavaScriptKit.com Multiple Choice Quiz" I have an image. Instead of using the radio buttons with the normal true/false question, I want to place two...
1
by: ramel | last post by:
Hi all, I have a problem related to javascript , ajax and jsp. Please see this url http://xil.co.in/print_screen_2.JPG. I am working on this form. There are some buttons (like submit ,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.