click chekbox in repeated region to enable field for that one row
Posted on 2014-10-21
I have a repeated region with a checkbox and a textbox. The textbox is disabled by default, but if user checks the box for that one row then the text box for that one row should be enabled.
The checkbox name is:
<input name="itemid" type="checkbox" id="itemid" value="<%=(PaymentLines.Fields.Item("Id").Value)%>">
The text field is:
<input name="amount" type="text" class="bodytext" id="amount" value="0" size="5" maxlength="10" disabled ="true">
As you can see it is disabled by default.
Checking the box should only enable the field for that particular row.
I tried using a script I have to disable a field and tweaking it but so far no luck.
function disableme(first, second)
((first.checked == true)?second.disabled = true:second.disabled = false );