When binding to a data list i use:
Select Case e.Item.ItemType
Case ListItemType.AlternatingItem, ListItemType.Item
Select Case _enmMode
Dim checkbox As CheckBox
checkbox = e.Item.FindControl("chkCabinSelected")
'todo add script to constrain number of selections to _intNoCabinsRequired
boolCabinSelected = false;
if (boolCabinSelected = false)'then we can allow the checkbox to be checked
alert("Danny Is A James Blunt");
boolCabinSelected = true;
here we need to not allow the checkbox to be checked in.
I am aware that i will need to pass the name of the checkbox in but am looking for some help on this as im not overly familiar with jscript as u might be noticing.
The checkboxes as present look like:
<input id="dlCabins_ctl01_chkCabinSelected" type="checkbox" name="dlCabins$ctl01$chkCabinSelected" onclick="CheckSingleCheckbox();" />
I'd appreciate some advice.
What I need is initially the boolCabinSelected value to be false, then whenever a checkbox is clicked the checkbox name is passed into the function, so i can first say, are any checkboxes checked, i.e is boolCabinSelected = true, if they are then i want the popup to display and the tickbox that was ticked to not get ticked, i.e set to unchecked, and if false then allow the checkbox to be checked and set the value of boolCabinSelected to be true