momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)
Cocoa ([personal profile] momijizukamori) wrote in [site community profile] dw_dev2016-09-11 05:19 pm

Creating AJAX post parameters for TT Controller?

I'm in the process of updating /customize/ to move it away from BML and a million widgets, and I've got most of the HTML-y stuff done, but I'm having trouble with the Javascript. The biggest part of this is redoing the AJAX queries, which were previously done in widget-specific ways and passed through a bunch of the Widget class handlers. Working off jQuery, I've gotten as far as getting it to submit a POST request which reaches the controller - but the param formatting is all wrong and missing a bunch of the parameters sent with a TT form POST request. Do we have methods for creating proper POST requests from AJAX?
kareila: (Default)

[personal profile] kareila 2016-09-12 02:27 am (UTC)(link)
Have you looked at the existing modules in DW/Controller/RPC? Do any of those do the type of handling you are trying to achieve? That's where I would start.