codingforumsun
02-24-2009, 08:19 AM
if( cols[5] != 'M' ) {
document.getElementById('Manager').checked=false;
document.getElementById('Trainer').checked=true;
alert("cols[5]: "+cols[5]);
}
else if( cols[5] != 'T' ) {
document.getElementById('Trainer').checked=false;
document.getElementById('Manager').checked=true;
alert("cols[5]: "+cols[5]);
In the above code I get 'M' and 'T' values from databse and the Manager radio Button works fine based on the value 'M'. But never Tariner Radio is checked even the value from database is 'T' and the alert shows it too.
Note: In the form I used attribute name="who" for both the Radio Buttons
Can any one help me? thanks
document.getElementById('Manager').checked=false;
document.getElementById('Trainer').checked=true;
alert("cols[5]: "+cols[5]);
}
else if( cols[5] != 'T' ) {
document.getElementById('Trainer').checked=false;
document.getElementById('Manager').checked=true;
alert("cols[5]: "+cols[5]);
In the above code I get 'M' and 'T' values from databse and the Manager radio Button works fine based on the value 'M'. But never Tariner Radio is checked even the value from database is 'T' and the alert shows it too.
Note: In the form I used attribute name="who" for both the Radio Buttons
Can any one help me? thanks