So i have this in my form:
<textarea onfocus="javascript:clearContents(this);" rows="5" cols="40" id="comment" name="comment">Skriv hvorfor du vælger at stemme ja/nej. Skal indeholde detaljer, kritik/råd. Klik for at skrive</textarea><br />
Ja: <input type="checkbox" value="Y" id="SCvote" name="SCvote"> eller Nej: <input type="checkbox" value="N" name="SCvote">
Now onfocus (when you click on the box) it clears the text "Skriv hvorfor...", but if you dont write anything and still submit it, my php code thinks it contains something and inserts that text "Skriv hvorfor...".
And another issue is the checkboxes. If i dont pick anything, it inserts "Y", even if i pick the other "N" it does "Y", and i dont want it to be possible that you can check both of them. how do i do?
definition of clearcontents:
function clearContents(element) {
element.innerHTML = '';
}