aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes How to activate the Radio button and select option Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to activate the Radio button and select option" Watch "How to activate the Radio button and select option" New topic
Author

How to activate the Radio button and select option

Arjun Palanichamy
Ranch Hand

Joined: Jul 15, 2006
Posts: 51
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

Joined: Oct 27, 2005
Posts: 19543
    
  16

Moved to HTML & JavaScript.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60057
    
  65

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 .


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
Don't get me started about those stupid light bulbs.
 
subject: How to activate the Radio button and select option
 
Similar Threads
how to delete the rows which are checked
spaces while populating using s:iterator
How to store answer available in option form in database table?
JSP Help Regarding the Radio Button
getting selected values from a list