I'm having an issue with the jquery post() function. I have several buttons and am using a single post function to handle all the buttons. I can't seem to get the variable post name to work.
my code is as follows:
JS
NOTE: the "editor" variable is variable that is set on init of my application and already exists in the scope of this code.
controls.find('button').live('click',function(){
//determine what button is clicked
var action = this.className;
$.post("actions.php",action: editor);
//functions run after post
});
the variable doesn't seem to get through. When I change the variable to a string it works fine. I've also tried running the toString(); function on my action variable with no change.
any ideas would be greatly appreciated.