You should be able to find lots of examples of this by googling.
Basically to change the input fields status you want to do something like what is shown below. You will need to google for the exact CSS syntax for the style attribute to control read-only status. I do not remember exactly what it is off the top of my head.
-
-
<span onclick="changeReadOnly('someButton')" >edit</span>
-
-
<input type="radio" id="someButton" />
-
-
<script>
-
function changeReadOnly( elementId ) {
-
var inputElement = document.getElementById( elementId );
-
inputElement.style.readOnly = 'false';
-
}
-
</script>
-
-