Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable radio button after edit button click

Status
Not open for further replies.

TheLazyPig

Programmer
Sep 26, 2019
94
PH
Hi!

This code is to view bank account. The number of rows depends on new added account and if its end date is null.

Code:
## for viewing bank account info
<input type = "hidden" name = "bnkseq" id = "bnkseq" value = "$!bnkacct_seqno">
#if($allowedviewlist)
   #if("$!bankaccntInfoList.size()" != "0")
   <fieldset>
	<legend>Bank Account Information</legend>
	    <table width="100%" cellpadding="1" cellspacing="2">
        	<a href="javascript:saveBank()"><img src = "images/Save.jpg" width="22" height="22" align="right" disabled="true">
		[b]<a href="javascript:editBank()"><img src = "images/Edit.jpg" width="22" height="22" align="right" >[/b]
	        <a href="javascript:addBank('$infoList.get(0).POLROLE_SEQNO')"><img src = "images/Add.jpg" width="22" height="22" align="right" >
				    
	<thead>
	 <tr align="center">
	   <th></th>
	   <th>Account No.</th>
	   <th>Bank Code</th>
	   <th>Type</th>
	   <th>Date Added</th>
	   <th>Default</th>
	</tr>
	</thead>
				  		
	#foreach($ba in $bankaccntInfoList)
	</tbody>   	
	<tr align="center">			    		
	  <td>$!ba.get("ACCTSTAT")</td>		  			
	  <td>$!ba.get("ACCTNO")</td>
	  <td>$!ba.get("BANKCODE")</td>
	  <td>$!ba.get("ACCTYPE")</td>
	  <td>$!ba.get("DATE_ADDED")</td>
	  [b]#if("$!ba.get('PAYOUT')"=="10019911" && "$!ba.get('ENDDATE')" == "")
	  <td><input type="radio" id="bnkseq" value="bnkdef" disabled="true" checked="checked"></td>
	  #else
          <td><input type="radio" id="bnkseq" value="bnkdef" disabled="true"></td>
	  #end[/b]		  			
	</tr>
	</tbody>
	#end
    </table>
   </fieldset>
    #end
#end
##

bnkacct_aunmdv.jpg


If I click the edit button all radio button in default column should be disabled=false but it won't work.

Code:
function editBank() {
    #foreach($ba in $bankaccntInfoList) 
	 document.getElementById("bnkseq").disabled = false;
    #end
	 document.getElementById("btnSave").disabled = false;
}


Thank you in advance!
 
Try just
Code:
bnkseq.disabled = false

If that doesn't work, try adding a name= to your input
Code:
<input type="radio" id="bnkseq" name="bnkseq" value="bnkdef" disabled="true">
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top