• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

onClick for table area???

Participant ,
Apr 21, 2006 Apr 21, 2006

Copy link to clipboard

Copied

Is there a way i can take this radio button i have and i want to click anywhere in the table row and have the button checked....Is this possible in CFML??? If so can i get a lil code snippet or a link......thanks......
TOPICS
Advanced techniques

Views

279

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 21, 2006 Apr 21, 2006

Copy link to clipboard

Copied

Wrap your <TR> tag in <A></A> and use onClick to check the radio button.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 21, 2006 Apr 21, 2006

Copy link to clipboard

Copied

so should it look like this???

<table cols="3" width="760" height="1">
<th align="left">
<tr bgcolor="black">
<td><font face="Times New Roman, Times, serif" size="+1" color="#FFFFFF">
Choose Your Location:</font>
</th>
</table>
<table cols="3" height="1" width="750">

<a><tr>
<td align="left" width="95" onClick="checked"><font face="Times New Roman, Times, serif">
<input type="radio" name="location" value="Centerville 8371 Yankee St. Centerville Ohio, 45448 Phone: (937)312-9368 Fax: (937)312-9369">Centerville 8371 Yankee St.  &nbsp   Centerville Ohio, 45448<br> &nbsp   Phone: (937)312-9368 <br> &nbsp   Fax:  &nbsp &nbsp(937)312-9369</td>

<td width="100" onClick="checked"><font face="Times New Roman, Times, serif">
<input type="radio" align="Center" name="location" value="Beavercreek 2633 Commons Blvd, Suite 110 Beavercreek, OH 45431 Phone: (937)312-9368 Fax: (937)312-9369">Beavercreek 2633 Commons Blvd,  &nbsp &nbsp&nbspSuite,110 Beavercreek, OH 45431<br>  &nbsp &nbsp&nbspPhone: (937)312-9368<br>  &nbsp &nbsp&nbspFax:  &nbsp &nbsp(937)312-9369</font></td>

<td width="100" onClick="checked"><font face="Times New Roman, Times, serif">
<input type="radio" name="location" value="Tipp City 1475 W. Main Street Tipp City, OH 45371 Phone: (937)312-9368 Fax: (937)312-9369">Tipp City 1475 W. Main Street  &nbsp &nbsp&nbspTipp City, OH 45371<br> &nbsp &nbsp&nbspPhone: (937)312-9368<br> &nbsp &nbsp&nbspFax:  &nbsp &nbsp(937)312-9369</font>
</td>
</tr>
</a>
</table>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 21, 2006 Apr 21, 2006

Copy link to clipboard

Copied

<input type="radio" name="abc" value="val1">
<a href="javascript:void(0)" onClick="abc[0].checked=true;">Value 1</a>

<input type="radio" name="abc" value="val2">
<a href="javascript:void(0)" onClick="abc[1].checked=true;">Value 2</a>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 21, 2006 Apr 21, 2006

Copy link to clipboard

Copied

LATEST
Now that I see your code, it seems that you want to have the radio button checked when you click on a column. Your example has three columns. I would suggest you wrap your <TD></TD> in the <A> tag.

Also, your onClick syntax is not correct. http://www.comptechdoc.org/independent/web/cgi/javamanual/javacheckbox.html should be of some help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation