?
Solved

checkbox is too small

Posted on 2012-08-30
3
Medium Priority
?
676 Views
Last Modified: 2012-08-30
<form>
<table>
<tr>
<td>
<input type="checkbox">
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>

<table>
<tr>
<td>
<input type="checkbox">
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>

<table>
<tr>
<td>
<input type="checkbox">
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>

</form>

Open in new window


tried adding
<label>

want a large area
ideally the each <table></table>
where user clicks and checkbox gets clicked

you can add ids and classes
0
Comment
Question by:rgb192
  • 2
3 Comments
 
LVL 61

Expert Comment

by:HainKurt
ID: 38351402
maybe something like this:

<style>
table {width:400; border:10 solid silver;}
</style>
<script>
function chk(id){
  document.getElementById(id).click();
}
</script>

<form>
<table onclick="chk('chk1')">
<tr><td><input id=chk1 type="checkbox"></td>
</table>

<table onclick="chk('chk2')">
<tr><td><input id=chk2 type="checkbox"></td>
</table>

<table onclick="chk('chk3')">
<tr><td><input id=chk3 type="checkbox"></td>
</table>
</form>

Open in new window

0
 
LVL 61

Accepted Solution

by:
HainKurt earned 2000 total points
ID: 38351425
with some fancy style...

<style>
table {width:400; border:10 solid silver; margin:20px;}
td.navon {background-color:yellow}
td.navoff {background-color:white}
</style>
<script>
function chk(id){
  document.getElementById(id).click();
}
</script>

<form>
<table onclick="chk('chk1')">
<tr><td class="navoff" onmouseover="className='navon'" onmouseout="className='navoff'"><input id=chk1 type="checkbox"></td>
</table>

<table onclick="chk('chk2')">
<tr><td class="navoff" onmouseover="className='navon'" onmouseout="className='navoff'"><input id=chk2 type="checkbox"></td>
</table>

<table onclick="chk('chk3')">
<tr><td class="navoff" onmouseover="className='navon'" onmouseout="className='navoff'"><input id=chk3 type="checkbox"></td>
</table>
</form>

Open in new window

0
 

Author Closing Comment

by:rgb192
ID: 38351907
thanks

your solution works for 3 tables


looking for a solution for 50 tables

http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_27848530.html
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month17 days, 12 hours left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question