I'm trying to send a form via AJAX, using jQuery. But I got the error when clicking the submitting button (it is actually a link, but doen't matter).
That's the error in the console:
Failed to read the 'selectionDirection' property from 'HTMLInputElement': The input element's type ('checkbox') does not support selection.
I suspect the problem is that I have some checkboxes there with a multiple selection, and they've been parsed like this:
var logo = $('input[name=extra]:checked');
I've tried to stringify them, so it looked like: var logo = JSON.stringify($('input[name=extra]:checked')); but it didn't seem to fix the problem.
What can be the reason or am I doing something wrong?
UPD: jsFiddle here
You have to get the value with the val() method:
$('input[name="line1"]:checked').val()
I updated your snippet here: http://jsfiddle.net/4mxsvch3/2/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With