I have a list of members of an organization, drawn from a SQL database. I have a few quick edit buttons at the top, and I want to be able to click one of them, and then use .post to send 3 pieces of data (which quickedit menu, the value, and the ID being edited) to a PHP page which updates the database. I've gotten it to work with static data, but I need to use variables, and I'm having trouble.
$("#memberlist_options_container.sub a").click(function(event){
event.preventDefault();
var myDataObject = {'menu: currentdropdownmenu, option: currentdropdownoption, ID: selectionID};
$.post("quickedit/index.php", myDataObject);
location.reload();
});
currentdropdownmenu and currentdropdown are javascript variables, and change depending on which drop down quick edit button is clicked. It's reloading the page, so I'm getting to the end, but it's not sending anything. What am I doing wrong? Thank you for the help!