Advertisement

04.26.2008 at 01:18PM PDT, ID: 23356187
[x]
Attachment Details

URGENT - onclick of radio button, change background of table cell

Asked by webdott in JavaScript, Hypertext Markup Language (HTML), Scripting Languages

Tags: javascript, html, script,

i need to be able to change the background color of an individual cell
with an onclick of a radio button.

each radio button will be able to change the cell to red, blue, green [ i will include color number later ]

each radio button will be located directly below the cell that the button will change.
the button will not be in the same cell as the color change. it will be in its own cell.

below is an example of the layout.

<TABLE WIDTH="500" CELLPADDING="0" CELLSPACING="0" BORDER="0">
    <TR>
     <TD WIDTH="10%" VALIGN=TOP></TD>
     <TD WIDTH="10%" VALIGN=TOP></TD>
     <TD WIDTH="10%" VALIGN=TOP></TD>
     <TD WIDTH="10%" VALIGN=TOP></TD>
     <TD WIDTH="10%" VALIGN=TOP></TD>
     <TD WIDTH="10%" VALIGN=TOP></TD>
     <TD WIDTH="10%" VALIGN=TOP></TD>
     <TD WIDTH="10%" VALIGN=TOP></TD>
     <TD WIDTH="10%" VALIGN=TOP></TD>
     <TD WIDTH="10%" VALIGN=TOP></TD>
    </TR>
    <TR>
     <TD WIDTH="10%" VALIGN=TOP>
      <P>
       <INPUT TYPE=RADIO NAME="1" ONCLICK="show(red);show(blue0;show(green)"></TD>
     <TD WIDTH="10%" VALIGN=TOP>
      <P>
       <INPUT TYPE=RADIO NAME="2" ONCLICK="show(red);show(blue0;show(green)"></TD>
     <TD WIDTH="10%" VALIGN=TOP>
      <P>
       <INPUT TYPE=RADIO NAME="3" ONCLICK="show(red);show(blue0;show(green)"></TD>
     <TD WIDTH="10%" VALIGN=TOP>
      <P>
       <INPUT TYPE=RADIO NAME="4" ONCLICK="show(red);show(blue0;show(green)"></TD>
     <TD WIDTH="10%" VALIGN=TOP>
      <P>
       <INPUT TYPE=RADIO NAME="5" ONCLICK="show(red);show(blue0;show(green)"></TD>
     <TD WIDTH="10%" VALIGN=TOP>
      <P>
       <INPUT TYPE=RADIO NAME="6" ONCLICK="show(red);show(blue0;show(green)"></TD>
     <TD WIDTH="10%" VALIGN=TOP>
      <P>
       <INPUT TYPE=RADIO NAME="7" ONCLICK="show(red);show(blue0;show(green)"></TD>
     <TD WIDTH="10%" VALIGN=TOP>
      <P>
       <INPUT TYPE=RADIO NAME="8" ONCLICK="show(red);show(blue0;show(green)"></TD>
     <TD WIDTH="10%" VALIGN=TOP>
      <P>
       <INPUT TYPE=RADIO NAME="9" ONCLICK="show(red);show(blue0;show(green)"></TD>
     <TD WIDTH="10%" VALIGN=TOP>
      <P>
       <INPUT TYPE=RADIO NAME="10" ONCLICK="show(red);show(blue0;show(green)"></TD>
    </TR>
   </TABLE>

i hope this can be done.
thanks
mikeStart Free Trial
[+][-]04.26.2008 at 01:45PM PDT, ID: 21446793

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.26.2008 at 04:30PM PDT, ID: 21447156

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.

 
[+][-]04.26.2008 at 04:59PM PDT, ID: 21447236

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

Zones: JavaScript, Hypertext Markup Language (HTML), Scripting Languages
Tags: javascript, html, script,
Sign Up Now!
Solution Provided By: wilq32
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628