I haven't looked at ugotsta's link, but I guess making a C2 plugin out of the script proposed would be the better solution and wouldn't require ajax calls.
Also, AJAX IS a call to some script (in the tutorial the script is PHP. You can script in another language, as long as it is hosted online and accessible from the C2 application I guess)