On a script im working off of, im trying to get it so send some data to a PHP file. I got all that working, but it doesnt send the right data! I have a bunch of checkboxes which are your options for what to send. here is an example:
HTML Code:
<input type="checkbox" id="comments" name="comments" value="on">Comments
And the javascript variable which gets its value...
Code:
var comments = document.getElementById("comments").value;
Problem is, no matter if its checked or not, it will always send the value "on". So how do I have it check to see if its actually checked off or not?
|