Can't get radio buttons stay checked?

admin

Administrator
Staff member
Hi,

I am constructing a calculator and want to use radio buttons to select a number of arithmetic operations. In this case 'Add', 'Subtract', 'Multiply' and 'Divide'. Although the desired symbol is displayed and it calculates the sum correctly the corresponding radio button will not remain selected i.e. checked

Can you help?

Thanks!!

-------------------------------------------------------

function InputData(checked){

document.calculator.display.value=document.calculator.display.value+checked;

}//InputData


<input type="radio" VALUE=http://www.webdeveloper.com/forum/archive/index.php/"Add" onClick="InputData('+')">+ </td>

<input type="radio" VALUE=http://www.webdeveloper.com/forum/archive/index.php/"Subtract" onClick="InputData ('-')">- </td>

<input type="radio" VALUE=http://www.webdeveloper.com/forum/archive/index.php/"Multiply" onClick="InputData('*')">* </td>

<input type="radio" VALUE=http://www.webdeveloper.com/forum/archive/index.php/"Divide" onClick="InputData('/')">/</td>
 
Back
Top