I have a few radio buttons in a page and I need to save their values or whatever value is selected to a file.
Here is a sample code:
<input name="select" type="radio" value="a" />
<input name="select" type="radio" value="b" />
<input name="select" type="radio" value="c" />
<input name="select" type="radio" value="d" />
Whenever the user selects one I need it saved / appended into a file.
Possible?
UPDATE:
Tried this:
<script>
$(document).ready(function () {
$("input[name='select']").change(function(e) {
e.preventDefault();
$.post("zzz.html", { selectedValue : $(this).val() }, function(response) {
// do something with server response
alert('saved');
});
});
});
</script>
Result: No Result. Nothing created / Nothing Saved.