faqts : Computers : Programming : Languages : JavaScript : Forms : Radio buttons

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

89 of 117 people (76%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

How to increase size of the radio button?

Apr 3rd, 2000 09:04
Martin Honnen, Yakov Simkin,


IE4+ and NN6 allow to style the width and height with CSS and to change 
the style with JavaScript:
<HTML>
<HEAD>
<STYLE>
.bigButton {
  width: 30px; height: 30px;
}
</STYLE>
<SCRIPT>
var d = 30;    
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME="formName">
<INPUT TYPE="radio" NAME="aRadioGroup" CLASS="bigButton">
<BR>
<INPUT TYPE="button" VALUE="increaseSize"
       ONCLICK="d += 5; 
                if (this.form.aRadioGroup.style) {
                 this.form.aRadioGroup.style.width = 
                  this.form.aRadioGroup.style.height = d + 'px';}"
>
</FORM>
</BODY>
</HTML>
NN4 is not applying the style and certainly not supporting to change it 
dynamically.