Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to activate the Radio button and select option

 
Arjun Palanichamy
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..

I have a html form, that have some selection option,radio button and all.

default first column radio button enabled other column disabled, now i want the select the radio button to be enabled,

here my code.

<tr bgcolor="#DEEDF4"><td align="center">
<input type="radio" name="bname_rad" id="bname1" on click="toggle(true)" value="LeaderBoard"></td>

<td align="center" class="style5Tx">Leaderboard</span>
<input type="hidden" name="bname" id="b1" value="LeaderBoard"></td>

<td align="center" class="style5Tn">20 $
<input type="hidden" name="adcost1" id="adcost1" value="20"></span></td>

<td align="center" ><span style="font-size:13px;font-family:">
<select disabled="disabled" id="no_imp1" name="imp1" size="1" onchange="cal_total(this);" class="style5To">
<option value="1000" selected="selected">1,000</option>
<option value="2000">2,000</option>
<option value="5000">5,000</option>
<option value="10000">10,000</option>
<option value="15000">15,000</option>
<option value="20000">20,000</option>
<option value="25000">25,000</option>
<option value="30000">30,000</option>
<option value="40000">40,000</option>
<option value="50000">50,000</option>
</select> <input type="hidden" value="tot" name="total"></td>

<td align="center" class="style5Tn"><span id="tot"><b>20</b></span><span style="color:red;"> $</span></b></td>

<td class="style5Tn" align="center">

<input disabled="disabled" type="radio" name="paymode" id="p11" value="onetime">One Time<br>

<input disabled="disabled" type="radio" name="paymode" id="p12" value="month">Monthly   </td>

</tr>


Script Code ///

function toggle()
{
document.getElementById("p11").disabled = true;
document.getElementById("p12").disabled = true;
}

i want select the first radio button (ID=bname1) to activate -- >
ID=no_imp1
and Id=P11,Id=P12

Please help me solve this problem...

Advanced Thanks.
Arjun
[ May 20, 2008: Message edited by: Arjun Palanichamy ]
 
Rob Spoor
Sheriff
Pie
Posts: 20492
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to HTML & JavaScript.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64606
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to use UBB code tags when posting code to the forums. Unformatted code is extermely hard to read and many people that might be able to help you will just move along. Please read this for more information.

You can go back and change your post to add code tags by clicking the .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic