|
Okay, so in the body of my page in HTML i have a form and at the bottom of the form is the following..
Click to Accept my Terms: <input type="radio" id="radio1">
<input type="submit" value="submit" onsubmit="myfunc()">
Now at the top of my page in the heading tags I want function myfunc() to say IF checkbock is NOT checked alert ("please accept my terms") then return false so the form is not submited. (So if need be i can change the 'onSubmit' to 'onClick'). I know how to "document.getElementById('id').value" for like a text-input where the value is a string of words... But i don't know how to see if the checkbox is clicked on or not please help me!
(heres how the function in my heading looks)
<head>
function myfunc()
{
if( RADIOBOX != CHECKED)
{
alert('please accept terms');
return="false";
}
}
</head>
|