I have six text field , It is possible let me to using a for loop to control the disabled ? I have code like[COD
Code:<html> <head> <script LANGUAGE="JavaScript"> function Hidden(){ if(document.fac.offer_type[1].checked==true) { for (i=0; i<=5; i++) { document.fac.namei.disabled=false } } </script> </head> <body> <p>Hello</p> <UL style="list-style-type:none"> <li><span class="red">Please select the type of </span></li> <li><input type="radio" name="offer_type" value="successful" onclick="Hidden()" > <b>successful</b></li> <li><input type="radio" name="offer_type" value="waitlisted" onclick="Hidden()" > <b>waitlisted</b></li> <li><input type="radio" name="offer_type" value="unsuccessful" onclick="Hidden()" > <b> (unsuccessful)</b></li> <li><input type="radio" name="offer_type" value="deferred" onclick="Hidden()"> <b> deferred consideration </b></li> </UL> <form name="fac" method="post" action="$!ACTION"> <table> <tr> <td class="tbrow">Name: <br> <input type="text" name="name1" disabled value="" size="30" maxlength="100"> </td> </tr> <tr> <td class="tbrow">Name: <br> <input type="text" name="name2" disabled value="" size="30" maxlength="100"> </td> </tr> </table> </form> </body> </html>:mad:


Reply With Quote
Bookmarks