Hello,

I'm having a few problems .

What I want to do is when the user clicks on a table row, it then enables/disables a checkbox held within that row.

HTML Code:

HTML Code:
<form action="?action=delete" method="post">

	<table>
	<th>ID</th><th>Forename</th><th>Surname</th><th>Institution</th><th>Membership Type</th><th>Delete</th>

		<tr>
			<td>1</td>
			<td>Forenames1</td>

			<td>AAUserSurname1</td>
			<td>University of Strathclyde</td>
			<td>Conference</td>
			<td><input type="checkbox" id="member_ids" name="member_ids[]" value="1" /></td>														
		</tr>

		<tr>
			<td>2</td>
			<td>Forenames2</td>

			<td>ACUserSurname2</td>
			<td>University of Edinburgh</td>
			<td>Corporate</td>
			<td><input type="checkbox" id="member_ids" name="member_ids[]" value="2" /></td>														
		</tr>

		<tr>
			<td>3</td>
			<td>Forenames3</td>

			<td>AZUserSurname3</td>
			<td>University of Stirling</td>
			<td>Life</td>
			<td><input type="checkbox" id="member_ids" name="member_ids[]" value="3" /></td>														
		</tr>

	</table>

	<button type="submit" class="confirm" name="submit">Delete Selected Members</button>

</form>		
Javascript:

Code:
function tableRowClickSetUp() {
	var theTrList = document.getElementsByTagName('tr');
	
	for (var i = 1; i < theTrList.length; i++) {
		var theTr = theTrList.item (i);
					
		theTr.onclick = function () {				
			var theInputList = this.getElementsByTagName('input');		
			var theInput = theInputList.lastChild;
						
			if (theInput.checked = true) {
				theInput.checked = false;
			} else {
				theInput.checked = true;
			}				
		}

	}
}
Does anyone know how to do this?

Thanks in advance