The following script is not checking working when testing the radio button
<script type="text/javascript">
function checkButton(){
if(document.getElementById('Revise').checked = true){
alert("hello");
}
}
</script>
The html code is:
<form:radiobutton id= "Revise" value="Revise" name="status" path="status"></form:radiobutton>
Do i need to call the function/or place it in the body?
.checked = trueshould be.checked == trueor just.checked. You are using the assignment operator instead of the equality operator. Also, I don't see anywhere where you call thecheckButtonfunction.document.getElementById('Revise').checked = truerow. Use a comparison sign (==or===) instead of just assigning (=).