Timeline for Wordpress plugin: admin-ajax.php not passing data to custom function
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 25, 2014 at 11:10 | comment | added | helgatheviking |
that.serialize() doesn't create a jQuery object, it creates a string with form: username=Smith . So to add the action you'd need to concatenate the string. contents = that.serialize + '&action=ea_ajax_handler (untested)
|
|
Mar 25, 2014 at 10:15 | vote | accept | Iam Zesh | ||
Mar 25, 2014 at 10:14 | comment | added | Iam Zesh |
@czerspalace Thank you but adding contents.action = 'ea_ajax_handler'; right after contents = that.serialize(); didn't work.
|
|
Mar 24, 2014 at 18:14 | answer | added | helgatheviking | timeline score: 0 | |
Mar 24, 2014 at 17:40 | comment | added | czerspalace | The action should be added to contents. so after setting contents and before the ajax call, add a line that says contents.action = 'ea_ajax_handler' | |
Mar 24, 2014 at 17:34 | history | asked | Iam Zesh | CC BY-SA 3.0 |