function sendValues() {
var str = $("#myForm").serialize();
var response = $('input[name=brand[]]:checked').val();
$.ajax({
url: "/trying.php?avoidcache=' + myTimestamp();",
data: {str}
cache: false
});
}
I want to be able to send the data onclick (checking the checkbox) and I need the checkbox to stay checked when it is sent to the server. Right now it does not stay checked, but the value of the checked is shot out.
Below is an example of what I am trying to accomplish..
http://www.abt.com/category/45/Bookshelf-Speakers.html
I can get the script to filter results, but there is 2 problems with it.
I want the ajax data to be sent to the server on click,
I need the checkboxes that have been [checked] to stay checked once the data is sent to the server.