Click to See Complete Forum and Search --> : Radio button CHECKED property


sri2004
11-04-2004, 09:38 AM
I have a form with 2 radio buttons. The radio button EditCampType1 will need to be checked by default. But if I choose F type and submit the form I will need to change the CHECKED property to radio button EditCampType2.
<INPUT type = "radio" Name = EditCampType1 Value = "C" CHECKED onClick= 'javascript: ctype();'<%=screenAccess%>> C Type
<INPUT type = "radio" Name = EditCampType2 Value = "F" onClick= 'javascript: ftype();'<%=screenAccess%>> F Type

My JavaScript functions are as follows:
function ctype() {
document.frmDetail.seltype.value = "C";
document.frmDetail.action = 'page1.asp';
document.frmDetail.submit();
}
function ftype() {
document.frmDetail.seltype.value = "F";
document.frmDetail.action = 'page1.asp';
document.frmDetail.submit();
}

Any help will be great!
Thanks

ray326
11-04-2004, 08:56 PM
First, that's not the way radio buttons work. All buttons in a group have to have the same name.